aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/uaccess.h
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2009-01-29 14:49:18 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-29 15:29:02 -0500
commit019a1369667c3978f9644982ebe6d261dd2bbc40 (patch)
tree14f978e6de4f01be4339354023b3725f0263cc7a /arch/x86/include/asm/uaccess.h
parent3b4b75700a245d0d48fc52a4d2f67d3155812aba (diff)
x86: uaccess: fix compilation error on CONFIG_M386
In case of !CONFIG_X86_WP_WORKS_OK, __put_user_size_ex() is not defined. Add macros for !CONFIG_X86_WP_WORKS_OK case. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/uaccess.h')
-rw-r--r--arch/x86/include/asm/uaccess.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 0ec6de4bcb0b..b9a24155f7af 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -525,8 +525,6 @@ struct __large_struct { unsigned long buf[100]; };
525 */ 525 */
526#define get_user_try uaccess_try 526#define get_user_try uaccess_try
527#define get_user_catch(err) uaccess_catch(err) 527#define get_user_catch(err) uaccess_catch(err)
528#define put_user_try uaccess_try
529#define put_user_catch(err) uaccess_catch(err)
530 528
531#define get_user_ex(x, ptr) do { \ 529#define get_user_ex(x, ptr) do { \
532 unsigned long __gue_val; \ 530 unsigned long __gue_val; \
@@ -534,9 +532,29 @@ struct __large_struct { unsigned long buf[100]; };
534 (x) = (__force __typeof__(*(ptr)))__gue_val; \ 532 (x) = (__force __typeof__(*(ptr)))__gue_val; \
535} while (0) 533} while (0)
536 534
535#ifdef CONFIG_X86_WP_WORKS_OK
536
537#define put_user_try uaccess_try
538#define put_user_catch(err) uaccess_catch(err)
539
537#define put_user_ex(x, ptr) \ 540#define put_user_ex(x, ptr) \
538 __put_user_size_ex((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr))) 541 __put_user_size_ex((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
539 542
543#else /* !CONFIG_X86_WP_WORKS_OK */
544
545#define put_user_try do { \
546 int __uaccess_err = 0;
547
548#define put_user_catch(err) \
549 (err) |= __uaccess_err; \
550} while (0)
551
552#define put_user_ex(x, ptr) do { \
553 __uaccess_err |= __put_user(x, ptr); \
554} while (0)
555
556#endif /* CONFIG_X86_WP_WORKS_OK */
557
540/* 558/*
541 * movsl can be slow when source and dest are not both 8-byte aligned 559 * movsl can be slow when source and dest are not both 8-byte aligned
542 */ 560 */