x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()
[sfrench/cifs-2.6.git] / include / linux / uaccess.h
index 94b28541165929ef4b9edbc2f4302e8809ec59c1..1ae36bc8db351d95ab9ad6cbe131fcc70b8e6dd3 100644 (file)
@@ -179,6 +179,19 @@ copy_in_user(void __user *to, const void __user *from, unsigned long n)
 }
 #endif
 
+#ifndef copy_mc_to_kernel
+/*
+ * Without arch opt-in this generic copy_mc_to_kernel() will not handle
+ * #MC (or arch equivalent) during source read.
+ */
+static inline unsigned long __must_check
+copy_mc_to_kernel(void *dst, const void *src, size_t cnt)
+{
+       memcpy(dst, src, cnt);
+       return 0;
+}
+#endif
+
 static __always_inline void pagefault_disabled_inc(void)
 {
        current->pagefault_disabled++;