[ARM] Remove save_lr/restore_pc macros
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 25 Jun 2006 10:37:09 +0000 (11:37 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Jun 2006 10:37:09 +0000 (11:37 +0100)
As for RETINSTR/LOADREGS macros, these were for compatibility
with 26-bit ARMs.  No longer required, so remove them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/lib/strncpy_from_user.S
arch/arm/lib/strnlen_user.S
include/asm-arm/assembler.h

index 629cc87752769e607ae6edf35e72d4e5e79951c3..35649f04fcac3f6c2c0b53327a7399c3de46d7f0 100644 (file)
@@ -21,7 +21,6 @@
  *  -EFAULT on exception, or "len" if we fill the whole buffer
  */
 ENTRY(__arch_strncpy_from_user)
-       save_lr
        mov     ip, r1
 1:     subs    r2, r2, #1
 USER(  ldrplbt r3, [r1], #1)
@@ -31,13 +30,13 @@ USER(       ldrplbt r3, [r1], #1)
        bne     1b
        sub     r1, r1, #1      @ take NUL character out of count
 2:     sub     r0, r1, ip
-       restore_pc
+       mov     pc, lr
 
        .section .fixup,"ax"
        .align  0
 9001:  mov     r3, #0
        strb    r3, [r0, #0]    @ null terminate
        mov     r0, #-EFAULT
-       restore_pc
+       mov     pc, lr
        .previous
 
index 67bcd8268128aa80e89dfb4584625f42397c03e6..3668a15991efddda846e01e01aed9127c98b895b 100644 (file)
@@ -21,7 +21,6 @@
  *           or zero on exception, or n + 1 if too long
  */
 ENTRY(__arch_strnlen_user)
-       save_lr
        mov     r2, r0
 1:
 USER(  ldrbt   r3, [r0], #1)
@@ -31,10 +30,10 @@ USER(       ldrbt   r3, [r0], #1)
        bne     1b
        add     r0, r0, #1
 2:     sub     r0, r0, r2
-       restore_pc
+       mov     pc, lr
 
        .section .fixup,"ax"
        .align  0
 9001:  mov     r0, #0
-       restore_pc
+       mov     pc, lr
        .previous
index add451ab89473948804619434181e9b216cdef6c..b97cb3e1ba72c949ca2d8be0b368c7e4af0948e6 100644 (file)
        msr     cpsr_c, \oldcpsr
        .endm
 
-/*
- * These two are used to save LR/restore PC over a user-based access.
- * The old 26-bit architecture requires that we do.  On 32-bit
- * architecture, we can safely ignore this requirement.
- */
-       .macro  save_lr
-       .endm
-
-       .macro  restore_pc
-       mov     pc, lr
-       .endm
-
 #define USER(x...)                             \
 9999:  x;                                      \
        .section __ex_table,"a";                \