linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] x86, putuser: cleanup 32-bit version a little
@ 2019-03-16 21:04 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2019-03-16 21:04 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa; +Cc: x86, linux-kernel

Delete CONFIG_X86_32 references and _ASM_* macros.
Don't bother with anything else because i386 is dead.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-16 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-16 21:04 [PATCH 3/4] x86, putuser: cleanup 32-bit version a little Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).