Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e68c825bb016703eda94aac99be96de73b482d61
Commit:     e68c825bb016703eda94aac99be96de73b482d61
Parent:     06533e28c9e8b252fbfb6858647afe48b5147e16
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 11 16:13:19 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Apr 13 04:09:38 2007 +1000

    [POWERPC] Add inatomic versions of __get_user and __put_user
    
    Those are needed by things like alignment exception fixup handlers
    since those can now be triggered by copy_tofrom_user_inatomic.
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 include/asm-powerpc/uaccess.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h
index adbf16b..8e798e3 100644
--- a/include/asm-powerpc/uaccess.h
+++ b/include/asm-powerpc/uaccess.h
@@ -110,12 +110,18 @@ struct exception_table_entry {
        __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
 #define __put_user(x, ptr) \
        __put_user_nocheck((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
+
 #ifndef __powerpc64__
 #define __get_user64(x, ptr) \
        __get_user64_nocheck((x), (ptr), sizeof(*(ptr)))
 #define __put_user64(x, ptr) __put_user(x, ptr)
 #endif
 
+#define __get_user_inatomic(x, ptr) \
+       __get_user_nosleep((x), (ptr), sizeof(*(ptr)))
+#define __put_user_inatomic(x, ptr) \
+       __put_user_nosleep((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
+
 #define __get_user_unaligned __get_user
 #define __put_user_unaligned __put_user
 
@@ -198,6 +204,16 @@ do {                                                       
        \
        __pu_err;                                                       \
 })
 
+#define __put_user_nosleep(x, ptr, size)                       \
+({                                                             \
+       long __pu_err;                                          \
+       __typeof__(*(ptr)) __user *__pu_addr = (ptr);           \
+       __chk_user_ptr(ptr);                                    \
+       __put_user_size((x), __pu_addr, (size), __pu_err);      \
+       __pu_err;                                               \
+})
+
+
 extern long __get_user_bad(void);
 
 #define __get_user_asm(x, addr, err, op)               \
@@ -297,6 +313,18 @@ do {                                                       
        \
        __gu_err;                                                       \
 })
 
+#define __get_user_nosleep(x, ptr, size)                       \
+({                                                             \
+       long __gu_err;                                          \
+       unsigned long __gu_val;                                 \
+       const __typeof__(*(ptr)) __user *__gu_addr = (ptr);     \
+       __chk_user_ptr(ptr);                                    \
+       __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \
+       (x) = (__typeof__(*(ptr)))__gu_val;                     \
+       __gu_err;                                               \
+})
+
+
 /* more complex routines */
 
 extern unsigned long __copy_tofrom_user(void __user *to,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to