[PATCH 3/4] x86, putuser: cleanup 32-bit version a little
From: Alexey Dobriyan
Date: Sat Mar 16 2019 - 17:04:10 EST
Delete CONFIG_X86_32 references and _ASM_* macros.
Don't bother with anything else because i386 is dead.
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
arch/x86/lib/putuser_32.S | 36 ++++++++++++++++--------------------
1 file changed, 16 insertions(+), 20 deletions(-)
--- a/arch/x86/lib/putuser_32.S
+++ b/arch/x86/lib/putuser_32.S
@@ -31,17 +31,17 @@
* as they get called from within inline assembly.
*/
-#define ENTER mov PER_CPU_VAR(current_task), %_ASM_BX
+#define ENTER mov PER_CPU_VAR(current_task), %ebx
#define EXIT ASM_CLAC ; \
ret
.text
ENTRY(__put_user_1)
ENTER
- cmp TASK_addr_limit(%_ASM_BX),%_ASM_CX
+ cmp TASK_addr_limit(%ebx),%ecx
jae bad_put_user
ASM_STAC
-1: movb %al,(%_ASM_CX)
+1: movb %al,(%ecx)
xor %eax,%eax
EXIT
ENDPROC(__put_user_1)
@@ -49,12 +49,12 @@ EXPORT_SYMBOL(__put_user_1)
ENTRY(__put_user_2)
ENTER
- mov TASK_addr_limit(%_ASM_BX),%_ASM_BX
- sub $1,%_ASM_BX
- cmp %_ASM_BX,%_ASM_CX
+ mov TASK_addr_limit(%ebx),%ebx
+ sub $1,%ebx
+ cmp %ebx,%ecx
jae bad_put_user
ASM_STAC
-2: movw %ax,(%_ASM_CX)
+2: movw %ax,(%ecx)
xor %eax,%eax
EXIT
ENDPROC(__put_user_2)
@@ -62,12 +62,12 @@ EXPORT_SYMBOL(__put_user_2)
ENTRY(__put_user_4)
ENTER
- mov TASK_addr_limit(%_ASM_BX),%_ASM_BX
- sub $3,%_ASM_BX
- cmp %_ASM_BX,%_ASM_CX
+ mov TASK_addr_limit(%ebx),%ebx
+ sub $3,%ebx
+ cmp %ebx,%ecx
jae bad_put_user
ASM_STAC
-3: movl %eax,(%_ASM_CX)
+3: movl %eax,(%ecx)
xor %eax,%eax
EXIT
ENDPROC(__put_user_4)
@@ -75,15 +75,13 @@ EXPORT_SYMBOL(__put_user_4)
ENTRY(__put_user_8)
ENTER
- mov TASK_addr_limit(%_ASM_BX),%_ASM_BX
- sub $7,%_ASM_BX
- cmp %_ASM_BX,%_ASM_CX
+ mov TASK_addr_limit(%ebx),%ebx
+ sub $7,%ebx
+ cmp %ebx,%ecx
jae bad_put_user
ASM_STAC
-4: mov %_ASM_AX,(%_ASM_CX)
-#ifdef CONFIG_X86_32
-5: movl %edx,4(%_ASM_CX)
-#endif
+4: mov %eax,(%ecx)
+5: movl %edx,4(%ecx)
xor %eax,%eax
EXIT
ENDPROC(__put_user_8)
@@ -98,6 +96,4 @@ END(bad_put_user)
_ASM_EXTABLE_UA(2b, bad_put_user)
_ASM_EXTABLE_UA(3b, bad_put_user)
_ASM_EXTABLE_UA(4b, bad_put_user)
-#ifdef CONFIG_X86_32
_ASM_EXTABLE_UA(5b, bad_put_user)
-#endif