From: Glauber Costa Date: Tue, 24 Jun 2008 15:40:55 +0000 (-0300) Subject: x86: don't save ebx in putuser_32.S. X-Git-Tag: v2.6.27-rc1~1106^2~46^2~28 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=268cf048c890d10bd3a86bd87922ed8a722d502f;p=linux-2.6 x86: don't save ebx in putuser_32.S. Clobber it in the inline asm macros, and let the compiler do this for us. Signed-off-by: Glauber Costa Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/lib/putuser_32.S b/arch/x86/lib/putuser_32.S index f58fba109d..5b2a926f0e 100644 --- a/arch/x86/lib/putuser_32.S +++ b/arch/x86/lib/putuser_32.S @@ -26,14 +26,8 @@ */ #define ENTER CFI_STARTPROC ; \ - pushl %ebx ; \ - CFI_ADJUST_CFA_OFFSET 4 ; \ - CFI_REL_OFFSET ebx, 0 ; \ GET_THREAD_INFO(%ebx) -#define EXIT popl %ebx ; \ - CFI_ADJUST_CFA_OFFSET -4 ; \ - CFI_RESTORE ebx ; \ - ret ; \ +#define EXIT ret ; \ CFI_ENDPROC .text @@ -81,10 +75,7 @@ ENTRY(__put_user_8) ENDPROC(__put_user_8) bad_put_user: - CFI_STARTPROC simple - CFI_DEF_CFA esp, 2*4 - CFI_OFFSET eip, -1*4 - CFI_OFFSET ebx, -2*4 + CFI_STARTPROC movl $-14,%eax EXIT END(bad_put_user) diff --git a/include/asm-x86/uaccess_32.h b/include/asm-x86/uaccess_32.h index 8e7595c1f3..0ecfe47ad6 100644 --- a/include/asm-x86/uaccess_32.h +++ b/include/asm-x86/uaccess_32.h @@ -188,23 +188,23 @@ extern void __put_user_8(void); #define __put_user_1(x, ptr) \ asm volatile("call __put_user_1" : "=a" (__ret_pu) \ - : "0" ((typeof(*(ptr)))(x)), "c" (ptr)) + : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") #define __put_user_2(x, ptr) \ asm volatile("call __put_user_2" : "=a" (__ret_pu) \ - : "0" ((typeof(*(ptr)))(x)), "c" (ptr)) + : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") #define __put_user_4(x, ptr) \ asm volatile("call __put_user_4" : "=a" (__ret_pu) \ - : "0" ((typeof(*(ptr)))(x)), "c" (ptr)) + : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") #define __put_user_8(x, ptr) \ asm volatile("call __put_user_8" : "=a" (__ret_pu) \ - : "A" ((typeof(*(ptr)))(x)), "c" (ptr)) + : "A" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx") #define __put_user_X(x, ptr) \ asm volatile("call __put_user_X" : "=a" (__ret_pu) \ - : "c" (ptr)) + : "c" (ptr): "ebx") /** * put_user: - Write a simple value into user space.