diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-13 23:11:07 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-02-13 23:11:07 +0000 |
commit | e610c324750a4b1f80d6d4980a796439773bff0d (patch) | |
tree | 13a23c251e7c1d2f7b364539250a186ecf0c6cec /sys/arch/amd64/include/cpu.h | |
parent | 3803ded5c18507905f6419a8c0b7410e9118cb82 (diff) |
Some Linux i915 drm "fast" path code relies on being able to "disable" page
faults to avoid sleeping. Implement this functionality for i386 and amd64
for faults in the user address space. If the ci_inatomic flag is set in
struct cpu_info, copyin(9) and copyout(9) will return EFAULT when a user-space
address needs to be faulted in. Use this to properly implement
__copy_to_user_inatomic() and __copy_from_user_inatomic_nocache() in the
inteldrm(4) code.
ok krw@, guenther@
Diffstat (limited to 'sys/arch/amd64/include/cpu.h')
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index cbbc52bd995..4495ed1a7a9 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.82 2013/10/05 16:58:30 guenther Exp $ */ +/* $OpenBSD: cpu.h,v 1.83 2014/02/13 23:11:06 kettenis Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -105,6 +105,8 @@ struct cpu_info { u_int32_t ci_cflushsz; u_int64_t ci_tsc_freq; + int ci_inatomic; + #define ARCH_HAVE_CPU_TOPOLOGY u_int32_t ci_smt_id; u_int32_t ci_core_id; |