aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/lib/strncpy_from_user.S5
-rw-r--r--arch/arm/lib/strnlen_user.S5
-rw-r--r--include/asm-arm/assembler.h12
3 files changed, 4 insertions, 18 deletions
diff --git a/arch/arm/lib/strncpy_from_user.S b/arch/arm/lib/strncpy_from_user.S
index 629cc8775276..35649f04fcac 100644
--- a/arch/arm/lib/strncpy_from_user.S
+++ b/arch/arm/lib/strncpy_from_user.S
@@ -21,7 +21,6 @@
21 * -EFAULT on exception, or "len" if we fill the whole buffer 21 * -EFAULT on exception, or "len" if we fill the whole buffer
22 */ 22 */
23ENTRY(__arch_strncpy_from_user) 23ENTRY(__arch_strncpy_from_user)
24 save_lr
25 mov ip, r1 24 mov ip, r1
261: subs r2, r2, #1 251: subs r2, r2, #1
27USER( ldrplbt r3, [r1], #1) 26USER( ldrplbt r3, [r1], #1)
@@ -31,13 +30,13 @@ USER( ldrplbt r3, [r1], #1)
31 bne 1b 30 bne 1b
32 sub r1, r1, #1 @ take NUL character out of count 31 sub r1, r1, #1 @ take NUL character out of count
332: sub r0, r1, ip 322: sub r0, r1, ip
34 restore_pc 33 mov pc, lr
35 34
36 .section .fixup,"ax" 35 .section .fixup,"ax"
37 .align 0 36 .align 0
389001: mov r3, #0 379001: mov r3, #0
39 strb r3, [r0, #0] @ null terminate 38 strb r3, [r0, #0] @ null terminate
40 mov r0, #-EFAULT 39 mov r0, #-EFAULT
41 restore_pc 40 mov pc, lr
42 .previous 41 .previous
43 42
diff --git a/arch/arm/lib/strnlen_user.S b/arch/arm/lib/strnlen_user.S
index 67bcd8268128..3668a15991ef 100644
--- a/arch/arm/lib/strnlen_user.S
+++ b/arch/arm/lib/strnlen_user.S
@@ -21,7 +21,6 @@
21 * or zero on exception, or n + 1 if too long 21 * or zero on exception, or n + 1 if too long
22 */ 22 */
23ENTRY(__arch_strnlen_user) 23ENTRY(__arch_strnlen_user)
24 save_lr
25 mov r2, r0 24 mov r2, r0
261: 251:
27USER( ldrbt r3, [r0], #1) 26USER( ldrbt r3, [r0], #1)
@@ -31,10 +30,10 @@ USER( ldrbt r3, [r0], #1)
31 bne 1b 30 bne 1b
32 add r0, r0, #1 31 add r0, r0, #1
332: sub r0, r0, r2 322: sub r0, r0, r2
34 restore_pc 33 mov pc, lr
35 34
36 .section .fixup,"ax" 35 .section .fixup,"ax"
37 .align 0 36 .align 0
389001: mov r0, #0 379001: mov r0, #0
39 restore_pc 38 mov pc, lr
40 .previous 39 .previous
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h
index add451ab8947..b97cb3e1ba72 100644
--- a/include/asm-arm/assembler.h
+++ b/include/asm-arm/assembler.h
@@ -100,18 +100,6 @@
100 msr cpsr_c, \oldcpsr 100 msr cpsr_c, \oldcpsr
101 .endm 101 .endm
102 102
103/*
104 * These two are used to save LR/restore PC over a user-based access.
105 * The old 26-bit architecture requires that we do. On 32-bit
106 * architecture, we can safely ignore this requirement.
107 */
108 .macro save_lr
109 .endm
110
111 .macro restore_pc
112 mov pc, lr
113 .endm
114
115#define USER(x...) \ 103#define USER(x...) \
1169999: x; \ 1049999: x; \
117 .section __ex_table,"a"; \ 105 .section __ex_table,"a"; \