]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/include/asm/uaccess.h
Merge branch 'uaccess' (batched user access infrastructure)
[karo-tx-linux.git] / arch / x86 / include / asm / uaccess.h
index ca59e4f9254eaef6e75484b86a3c7563bfb659e3..a4a30e4b2d34321d96ddd02413d037d3f6cb95d9 100644 (file)
@@ -762,6 +762,15 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
 #undef __copy_from_user_overflow
 #undef __copy_to_user_overflow
 
+/*
+ * We rely on the nested NMI work to allow atomic faults from the NMI path; the
+ * nested NMI paths are careful to preserve CR2.
+ *
+ * Caller must use pagefault_enable/disable, or run in interrupt context,
+ * and also do a uaccess_ok() check
+ */
+#define __copy_from_user_nmi __copy_from_user_inatomic
+
 /*
  * The "unsafe" user accesses aren't really "unsafe", but the naming
  * is a big fat warning: you have to not only do the access_ok()