From: Andrew Morton <[email-masked]>

Make it compile on !x86

Cc: Hiro Yoshioka <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 include/asm-i386/uaccess.h |    2 ++
 include/linux/uaccess.h    |   22 ++++++++++++++++++++++
 mm/filemap.c               |    2 +-
 3 files changed, 25 insertions(+), 1 deletion(-)

diff -puN /dev/null include/linux/uaccess.h
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ devel-akpm/include/linux/uaccess.h	2005-09-12 03:34:31.000000000 -0700
@@ -0,0 +1,22 @@
+#ifndef __LINUX_UACCESS_H__
+#define __LINUX_UACCESS_H__
+
+#include <asm/uaccess.h>
+
+#ifndef ARCH_HAS_NOCACHE_UACCESS
+
+static inline unsigned long __copy_from_user_inatomic_nocache(void *to,
+				const void __user *from, unsigned long n)
+{
+	return __copy_from_user_inatomic(to, from, n);
+}
+
+static inline unsigned long __copy_from_user_nocache(void *to,
+				const void __user *from, unsigned long n)
+{
+	return __copy_from_user(to, from, n);
+}
+
+#endif		/* ARCH_HAS_NOCACHE_UACCESS */
+
+#endif		/* __LINUX_UACCESS_H__ */
diff -puN mm/filemap.c~x86-cache-pollution-aware-__copy_from_user_ll-build-fix mm/filemap.c
--- devel/mm/filemap.c~x86-cache-pollution-aware-__copy_from_user_ll-build-fix	2005-09-12 03:34:31.000000000 -0700
+++ devel-akpm/mm/filemap.c	2005-09-12 03:34:31.000000000 -0700
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/compiler.h>
 #include <linux/fs.h>
+#include <linux/uaccess.h>
 #include <linux/aio.h>
 #include <linux/kernel_stat.h>
 #include <linux/mm.h>
@@ -34,7 +35,6 @@
  */
 #include <linux/buffer_head.h> /* for generic_osync_inode */
 
-#include <asm/uaccess.h>
 #include <asm/mman.h>
 
 static ssize_t
diff -puN include/asm-i386/uaccess.h~x86-cache-pollution-aware-__copy_from_user_ll-build-fix include/asm-i386/uaccess.h
--- devel/include/asm-i386/uaccess.h~x86-cache-pollution-aware-__copy_from_user_ll-build-fix	2005-09-12 03:34:31.000000000 -0700
+++ devel-akpm/include/asm-i386/uaccess.h	2005-09-12 03:34:31.000000000 -0700
@@ -479,6 +479,8 @@ __copy_from_user_inatomic(void *to, cons
 	return __copy_from_user_ll(to, from, n);
 }
 
+#define ARCH_HAS_NOCACHE_UACCESS
+
 static inline unsigned long __copy_from_user_inatomic_nocache(void *to,
 				const void __user *from, unsigned long n)
 {
_