summaryrefslogtreecommitdiff
path: root/include/asm-ppc64
diff options
context:
space:
mode:
authorArun Sharma <arun.sharma@intel.com>2004-08-26 20:43:14 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-26 20:43:14 -0700
commitce18373907856aedaa6251ff3cdd1340ee4af29a (patch)
treef6067623ca7a61bc55b122b90c90d147732e5615 /include/asm-ppc64
parentfec18575fbb0faf522afbf5b5288962a79ed542f (diff)
[PATCH] Fix copying of unaligned data across user/kernel boundary
32 bit compatibility code sometimes needs to copy unaligned data across kernel/user boundary and currently there is no architecture independent API to do it. (1) Introduce new APIs __{get,put}_user_unaligned. These APIs are necessary because the optimal way to copy unaligned data across kernel/user boundary is different on different architectures. Some architectures don't even care about alignment. On some __put_user is faster than __copy_to_user for small sizes. (2) Optimize __{get,put}_user_unaligned for ia64, x86-64, s390, ppc64. (3) Fix compat_filldir64() which is broken on big-endian machines Thanks to Arnd Bergmann <arnd@arndb.de> for his help. Signed-off-by: Gordon Jin <gordon.jin@intel.com> Signed-off-by: Arun Sharma <arun.sharma@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/uaccess.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h
index 16dbcb999335..58eec5324170 100644
--- a/include/asm-ppc64/uaccess.h
+++ b/include/asm-ppc64/uaccess.h
@@ -111,6 +111,9 @@ extern unsigned long search_exception_table(unsigned long);
#define __put_user(x,ptr) \
__put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
+#define __get_user_unaligned __get_user
+#define __put_user_unaligned __put_user
+
extern long __put_user_bad(void);
#define __put_user_nocheck(x,ptr,size) \