aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-01-25 05:38:13 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-25 06:07:40 -0500
commit4e7682d077d693e34a993ae7a2831b522930ebcb (patch)
treea891a6a1393e3cf7df8e70a6c41579a03475e920 /arch
parentd68133b5a81bd9c4b673c2a731ac1a33a9dc0cb8 (diff)
ARM: 7301/1: Rename the T() macro to TUSER() to avoid namespace conflicts
This macro is used to generate unprivileged accesses (LDRT/STRT) to user space. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/assembler.h4
-rw-r--r--arch/arm/include/asm/domain.h8
-rw-r--r--arch/arm/include/asm/futex.h8
-rw-r--r--arch/arm/include/asm/uaccess.h16
-rw-r--r--arch/arm/lib/getuser.S12
-rw-r--r--arch/arm/lib/putuser.S28
-rw-r--r--arch/arm/lib/uaccess.S82
7 files changed, 79 insertions, 79 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index b6e65dedfd71..62f8095d46de 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -237,7 +237,7 @@
237 */ 237 */
238#ifdef CONFIG_THUMB2_KERNEL 238#ifdef CONFIG_THUMB2_KERNEL
239 239
240 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T() 240 .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER()
2419999: 2419999:
242 .if \inc == 1 242 .if \inc == 1
243 \instr\cond\()b\()\t\().w \reg, [\ptr, #\off] 243 \instr\cond\()b\()\t\().w \reg, [\ptr, #\off]
@@ -277,7 +277,7 @@
277 277
278#else /* !CONFIG_THUMB2_KERNEL */ 278#else /* !CONFIG_THUMB2_KERNEL */
279 279
280 .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T() 280 .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=TUSER()
281 .rept \rept 281 .rept \rept
2829999: 2829999:
283 .if \inc == 1 283 .if \inc == 1
diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h
index af18ceaacf5d..b5dc173d336f 100644
--- a/arch/arm/include/asm/domain.h
+++ b/arch/arm/include/asm/domain.h
@@ -83,9 +83,9 @@
83 * instructions (inline assembly) 83 * instructions (inline assembly)
84 */ 84 */
85#ifdef CONFIG_CPU_USE_DOMAINS 85#ifdef CONFIG_CPU_USE_DOMAINS
86#define T(instr) #instr "t" 86#define TUSER(instr) #instr "t"
87#else 87#else
88#define T(instr) #instr 88#define TUSER(instr) #instr
89#endif 89#endif
90 90
91#else /* __ASSEMBLY__ */ 91#else /* __ASSEMBLY__ */
@@ -95,9 +95,9 @@
95 * instructions 95 * instructions
96 */ 96 */
97#ifdef CONFIG_CPU_USE_DOMAINS 97#ifdef CONFIG_CPU_USE_DOMAINS
98#define T(instr) instr ## t 98#define TUSER(instr) instr ## t
99#else 99#else
100#define T(instr) instr 100#define TUSER(instr) instr
101#endif 101#endif
102 102
103#endif /* __ASSEMBLY__ */ 103#endif /* __ASSEMBLY__ */
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index 253cc86318bf..7be54690aeec 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -75,9 +75,9 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
75 75
76#define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \ 76#define __futex_atomic_op(insn, ret, oldval, tmp, uaddr, oparg) \
77 __asm__ __volatile__( \ 77 __asm__ __volatile__( \
78 "1: " T(ldr) " %1, [%3]\n" \ 78 "1: " TUSER(ldr) " %1, [%3]\n" \
79 " " insn "\n" \ 79 " " insn "\n" \
80 "2: " T(str) " %0, [%3]\n" \ 80 "2: " TUSER(str) " %0, [%3]\n" \
81 " mov %0, #0\n" \ 81 " mov %0, #0\n" \
82 __futex_atomic_ex_table("%5") \ 82 __futex_atomic_ex_table("%5") \
83 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \ 83 : "=&r" (ret), "=&r" (oldval), "=&r" (tmp) \
@@ -95,10 +95,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
95 return -EFAULT; 95 return -EFAULT;
96 96
97 __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" 97 __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
98 "1: " T(ldr) " %1, [%4]\n" 98 "1: " TUSER(ldr) " %1, [%4]\n"
99 " teq %1, %2\n" 99 " teq %1, %2\n"
100 " it eq @ explicit IT needed for the 2b label\n" 100 " it eq @ explicit IT needed for the 2b label\n"
101 "2: " T(streq) " %3, [%4]\n" 101 "2: " TUSER(streq) " %3, [%4]\n"
102 __futex_atomic_ex_table("%5") 102 __futex_atomic_ex_table("%5")
103 : "+r" (ret), "=&r" (val) 103 : "+r" (ret), "=&r" (val)
104 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 104 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index b293616a1a1a..2958976d867b 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -227,7 +227,7 @@ do { \
227 227
228#define __get_user_asm_byte(x,addr,err) \ 228#define __get_user_asm_byte(x,addr,err) \
229 __asm__ __volatile__( \ 229 __asm__ __volatile__( \
230 "1: " T(ldrb) " %1,[%2],#0\n" \ 230 "1: " TUSER(ldrb) " %1,[%2],#0\n" \
231 "2:\n" \ 231 "2:\n" \
232 " .pushsection .fixup,\"ax\"\n" \ 232 " .pushsection .fixup,\"ax\"\n" \
233 " .align 2\n" \ 233 " .align 2\n" \
@@ -263,7 +263,7 @@ do { \
263 263
264#define __get_user_asm_word(x,addr,err) \ 264#define __get_user_asm_word(x,addr,err) \
265 __asm__ __volatile__( \ 265 __asm__ __volatile__( \
266 "1: " T(ldr) " %1,[%2],#0\n" \ 266 "1: " TUSER(ldr) " %1,[%2],#0\n" \
267 "2:\n" \ 267 "2:\n" \
268 " .pushsection .fixup,\"ax\"\n" \ 268 " .pushsection .fixup,\"ax\"\n" \
269 " .align 2\n" \ 269 " .align 2\n" \
@@ -308,7 +308,7 @@ do { \
308 308
309#define __put_user_asm_byte(x,__pu_addr,err) \ 309#define __put_user_asm_byte(x,__pu_addr,err) \
310 __asm__ __volatile__( \ 310 __asm__ __volatile__( \
311 "1: " T(strb) " %1,[%2],#0\n" \ 311 "1: " TUSER(strb) " %1,[%2],#0\n" \
312 "2:\n" \ 312 "2:\n" \
313 " .pushsection .fixup,\"ax\"\n" \ 313 " .pushsection .fixup,\"ax\"\n" \
314 " .align 2\n" \ 314 " .align 2\n" \
@@ -341,7 +341,7 @@ do { \
341 341
342#define __put_user_asm_word(x,__pu_addr,err) \ 342#define __put_user_asm_word(x,__pu_addr,err) \
343 __asm__ __volatile__( \ 343 __asm__ __volatile__( \
344 "1: " T(str) " %1,[%2],#0\n" \ 344 "1: " TUSER(str) " %1,[%2],#0\n" \
345 "2:\n" \ 345 "2:\n" \
346 " .pushsection .fixup,\"ax\"\n" \ 346 " .pushsection .fixup,\"ax\"\n" \
347 " .align 2\n" \ 347 " .align 2\n" \
@@ -366,10 +366,10 @@ do { \
366 366
367#define __put_user_asm_dword(x,__pu_addr,err) \ 367#define __put_user_asm_dword(x,__pu_addr,err) \
368 __asm__ __volatile__( \ 368 __asm__ __volatile__( \
369 ARM( "1: " T(str) " " __reg_oper1 ", [%1], #4\n" ) \ 369 ARM( "1: " TUSER(str) " " __reg_oper1 ", [%1], #4\n" ) \
370 ARM( "2: " T(str) " " __reg_oper0 ", [%1]\n" ) \ 370 ARM( "2: " TUSER(str) " " __reg_oper0 ", [%1]\n" ) \
371 THUMB( "1: " T(str) " " __reg_oper1 ", [%1]\n" ) \ 371 THUMB( "1: " TUSER(str) " " __reg_oper1 ", [%1]\n" ) \
372 THUMB( "2: " T(str) " " __reg_oper0 ", [%1, #4]\n" ) \ 372 THUMB( "2: " TUSER(str) " " __reg_oper0 ", [%1, #4]\n" ) \
373 "3:\n" \ 373 "3:\n" \
374 " .pushsection .fixup,\"ax\"\n" \ 374 " .pushsection .fixup,\"ax\"\n" \
375 " .align 2\n" \ 375 " .align 2\n" \
diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S
index 1b049cd7a49a..11093a7c3e32 100644
--- a/arch/arm/lib/getuser.S
+++ b/arch/arm/lib/getuser.S
@@ -31,18 +31,18 @@
31#include <asm/domain.h> 31#include <asm/domain.h>
32 32
33ENTRY(__get_user_1) 33ENTRY(__get_user_1)
341: T(ldrb) r2, [r0] 341: TUSER(ldrb) r2, [r0]
35 mov r0, #0 35 mov r0, #0
36 mov pc, lr 36 mov pc, lr
37ENDPROC(__get_user_1) 37ENDPROC(__get_user_1)
38 38
39ENTRY(__get_user_2) 39ENTRY(__get_user_2)
40#ifdef CONFIG_THUMB2_KERNEL 40#ifdef CONFIG_THUMB2_KERNEL
412: T(ldrb) r2, [r0] 412: TUSER(ldrb) r2, [r0]
423: T(ldrb) r3, [r0, #1] 423: TUSER(ldrb) r3, [r0, #1]
43#else 43#else
442: T(ldrb) r2, [r0], #1 442: TUSER(ldrb) r2, [r0], #1
453: T(ldrb) r3, [r0] 453: TUSER(ldrb) r3, [r0]
46#endif 46#endif
47#ifndef __ARMEB__ 47#ifndef __ARMEB__
48 orr r2, r2, r3, lsl #8 48 orr r2, r2, r3, lsl #8
@@ -54,7 +54,7 @@ ENTRY(__get_user_2)
54ENDPROC(__get_user_2) 54ENDPROC(__get_user_2)
55 55
56ENTRY(__get_user_4) 56ENTRY(__get_user_4)
574: T(ldr) r2, [r0] 574: TUSER(ldr) r2, [r0]
58 mov r0, #0 58 mov r0, #0
59 mov pc, lr 59 mov pc, lr
60ENDPROC(__get_user_4) 60ENDPROC(__get_user_4)
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S
index c023fc11e86c..7db25990c589 100644
--- a/arch/arm/lib/putuser.S
+++ b/arch/arm/lib/putuser.S
@@ -31,7 +31,7 @@
31#include <asm/domain.h> 31#include <asm/domain.h>
32 32
33ENTRY(__put_user_1) 33ENTRY(__put_user_1)
341: T(strb) r2, [r0] 341: TUSER(strb) r2, [r0]
35 mov r0, #0 35 mov r0, #0
36 mov pc, lr 36 mov pc, lr
37ENDPROC(__put_user_1) 37ENDPROC(__put_user_1)
@@ -40,19 +40,19 @@ ENTRY(__put_user_2)
40 mov ip, r2, lsr #8 40 mov ip, r2, lsr #8
41#ifdef CONFIG_THUMB2_KERNEL 41#ifdef CONFIG_THUMB2_KERNEL
42#ifndef __ARMEB__ 42#ifndef __ARMEB__
432: T(strb) r2, [r0] 432: TUSER(strb) r2, [r0]
443: T(strb) ip, [r0, #1] 443: TUSER(strb) ip, [r0, #1]
45#else 45#else
462: T(strb) ip, [r0] 462: TUSER(strb) ip, [r0]
473: T(strb) r2, [r0, #1] 473: TUSER(strb) r2, [r0, #1]
48#endif 48#endif
49#else /* !CONFIG_THUMB2_KERNEL */ 49#else /* !CONFIG_THUMB2_KERNEL */
50#ifndef __ARMEB__ 50#ifndef __ARMEB__
512: T(strb) r2, [r0], #1 512: TUSER(strb) r2, [r0], #1
523: T(strb) ip, [r0] 523: TUSER(strb) ip, [r0]
53#else 53#else
542: T(strb) ip, [r0], #1 542: TUSER(strb) ip, [r0], #1
553: T(strb) r2, [r0] 553: TUSER(strb) r2, [r0]
56#endif 56#endif
57#endif /* CONFIG_THUMB2_KERNEL */ 57#endif /* CONFIG_THUMB2_KERNEL */
58 mov r0, #0 58 mov r0, #0
@@ -60,18 +60,18 @@ ENTRY(__put_user_2)
60ENDPROC(__put_user_2) 60ENDPROC(__put_user_2)
61 61
62ENTRY(__put_user_4) 62ENTRY(__put_user_4)
634: T(str) r2, [r0] 634: TUSER(str) r2, [r0]
64 mov r0, #0 64 mov r0, #0
65 mov pc, lr 65 mov pc, lr
66ENDPROC(__put_user_4) 66ENDPROC(__put_user_4)
67 67
68ENTRY(__put_user_8) 68ENTRY(__put_user_8)
69#ifdef CONFIG_THUMB2_KERNEL 69#ifdef CONFIG_THUMB2_KERNEL
705: T(str) r2, [r0] 705: TUSER(str) r2, [r0]
716: T(str) r3, [r0, #4] 716: TUSER(str) r3, [r0, #4]
72#else 72#else
735: T(str) r2, [r0], #4 735: TUSER(str) r2, [r0], #4
746: T(str) r3, [r0] 746: TUSER(str) r3, [r0]
75#endif 75#endif
76 mov r0, #0 76 mov r0, #0
77 mov pc, lr 77 mov pc, lr
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S
index d0ece2aeb70d..5c908b1cb8ed 100644
--- a/arch/arm/lib/uaccess.S
+++ b/arch/arm/lib/uaccess.S
@@ -32,11 +32,11 @@
32 rsb ip, ip, #4 32 rsb ip, ip, #4
33 cmp ip, #2 33 cmp ip, #2
34 ldrb r3, [r1], #1 34 ldrb r3, [r1], #1
35USER( T(strb) r3, [r0], #1) @ May fault 35USER( TUSER( strb) r3, [r0], #1) @ May fault
36 ldrgeb r3, [r1], #1 36 ldrgeb r3, [r1], #1
37USER( T(strgeb) r3, [r0], #1) @ May fault 37USER( TUSER( strgeb) r3, [r0], #1) @ May fault
38 ldrgtb r3, [r1], #1 38 ldrgtb r3, [r1], #1
39USER( T(strgtb) r3, [r0], #1) @ May fault 39USER( TUSER( strgtb) r3, [r0], #1) @ May fault
40 sub r2, r2, ip 40 sub r2, r2, ip
41 b .Lc2u_dest_aligned 41 b .Lc2u_dest_aligned
42 42
@@ -59,7 +59,7 @@ ENTRY(__copy_to_user)
59 addmi ip, r2, #4 59 addmi ip, r2, #4
60 bmi .Lc2u_0nowords 60 bmi .Lc2u_0nowords
61 ldr r3, [r1], #4 61 ldr r3, [r1], #4
62USER( T(str) r3, [r0], #4) @ May fault 62USER( TUSER( str) r3, [r0], #4) @ May fault
63 mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 63 mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
64 rsb ip, ip, #0 64 rsb ip, ip, #0
65 movs ip, ip, lsr #32 - PAGE_SHIFT 65 movs ip, ip, lsr #32 - PAGE_SHIFT
@@ -88,18 +88,18 @@ USER( T(str) r3, [r0], #4) @ May fault
88 stmneia r0!, {r3 - r4} @ Shouldnt fault 88 stmneia r0!, {r3 - r4} @ Shouldnt fault
89 tst ip, #4 89 tst ip, #4
90 ldrne r3, [r1], #4 90 ldrne r3, [r1], #4
91 T(strne) r3, [r0], #4 @ Shouldnt fault 91 TUSER( strne) r3, [r0], #4 @ Shouldnt fault
92 ands ip, ip, #3 92 ands ip, ip, #3
93 beq .Lc2u_0fupi 93 beq .Lc2u_0fupi
94.Lc2u_0nowords: teq ip, #0 94.Lc2u_0nowords: teq ip, #0
95 beq .Lc2u_finished 95 beq .Lc2u_finished
96.Lc2u_nowords: cmp ip, #2 96.Lc2u_nowords: cmp ip, #2
97 ldrb r3, [r1], #1 97 ldrb r3, [r1], #1
98USER( T(strb) r3, [r0], #1) @ May fault 98USER( TUSER( strb) r3, [r0], #1) @ May fault
99 ldrgeb r3, [r1], #1 99 ldrgeb r3, [r1], #1
100USER( T(strgeb) r3, [r0], #1) @ May fault 100USER( TUSER( strgeb) r3, [r0], #1) @ May fault
101 ldrgtb r3, [r1], #1 101 ldrgtb r3, [r1], #1
102USER( T(strgtb) r3, [r0], #1) @ May fault 102USER( TUSER( strgtb) r3, [r0], #1) @ May fault
103 b .Lc2u_finished 103 b .Lc2u_finished
104 104
105.Lc2u_not_enough: 105.Lc2u_not_enough:
@@ -120,7 +120,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault
120 mov r3, r7, pull #8 120 mov r3, r7, pull #8
121 ldr r7, [r1], #4 121 ldr r7, [r1], #4
122 orr r3, r3, r7, push #24 122 orr r3, r3, r7, push #24
123USER( T(str) r3, [r0], #4) @ May fault 123USER( TUSER( str) r3, [r0], #4) @ May fault
124 mov ip, r0, lsl #32 - PAGE_SHIFT 124 mov ip, r0, lsl #32 - PAGE_SHIFT
125 rsb ip, ip, #0 125 rsb ip, ip, #0
126 movs ip, ip, lsr #32 - PAGE_SHIFT 126 movs ip, ip, lsr #32 - PAGE_SHIFT
@@ -155,18 +155,18 @@ USER( T(str) r3, [r0], #4) @ May fault
155 movne r3, r7, pull #8 155 movne r3, r7, pull #8
156 ldrne r7, [r1], #4 156 ldrne r7, [r1], #4
157 orrne r3, r3, r7, push #24 157 orrne r3, r3, r7, push #24
158 T(strne) r3, [r0], #4 @ Shouldnt fault 158 TUSER( strne) r3, [r0], #4 @ Shouldnt fault
159 ands ip, ip, #3 159 ands ip, ip, #3
160 beq .Lc2u_1fupi 160 beq .Lc2u_1fupi
161.Lc2u_1nowords: mov r3, r7, get_byte_1 161.Lc2u_1nowords: mov r3, r7, get_byte_1
162 teq ip, #0 162 teq ip, #0
163 beq .Lc2u_finished 163 beq .Lc2u_finished
164 cmp ip, #2 164 cmp ip, #2
165USER( T(strb) r3, [r0], #1) @ May fault 165USER( TUSER( strb) r3, [r0], #1) @ May fault
166 movge r3, r7, get_byte_2 166 movge r3, r7, get_byte_2
167USER( T(strgeb) r3, [r0], #1) @ May fault 167USER( TUSER( strgeb) r3, [r0], #1) @ May fault
168 movgt r3, r7, get_byte_3 168 movgt r3, r7, get_byte_3
169USER( T(strgtb) r3, [r0], #1) @ May fault 169USER( TUSER( strgtb) r3, [r0], #1) @ May fault
170 b .Lc2u_finished 170 b .Lc2u_finished
171 171
172.Lc2u_2fupi: subs r2, r2, #4 172.Lc2u_2fupi: subs r2, r2, #4
@@ -175,7 +175,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault
175 mov r3, r7, pull #16 175 mov r3, r7, pull #16
176 ldr r7, [r1], #4 176 ldr r7, [r1], #4
177 orr r3, r3, r7, push #16 177 orr r3, r3, r7, push #16
178USER( T(str) r3, [r0], #4) @ May fault 178USER( TUSER( str) r3, [r0], #4) @ May fault
179 mov ip, r0, lsl #32 - PAGE_SHIFT 179 mov ip, r0, lsl #32 - PAGE_SHIFT
180 rsb ip, ip, #0 180 rsb ip, ip, #0
181 movs ip, ip, lsr #32 - PAGE_SHIFT 181 movs ip, ip, lsr #32 - PAGE_SHIFT
@@ -210,18 +210,18 @@ USER( T(str) r3, [r0], #4) @ May fault
210 movne r3, r7, pull #16 210 movne r3, r7, pull #16
211 ldrne r7, [r1], #4 211 ldrne r7, [r1], #4
212 orrne r3, r3, r7, push #16 212 orrne r3, r3, r7, push #16
213 T(strne) r3, [r0], #4 @ Shouldnt fault 213 TUSER( strne) r3, [r0], #4 @ Shouldnt fault
214 ands ip, ip, #3 214 ands ip, ip, #3
215 beq .Lc2u_2fupi 215 beq .Lc2u_2fupi
216.Lc2u_2nowords: mov r3, r7, get_byte_2 216.Lc2u_2nowords: mov r3, r7, get_byte_2
217 teq ip, #0 217 teq ip, #0
218 beq .Lc2u_finished 218 beq .Lc2u_finished
219 cmp ip, #2 219 cmp ip, #2
220USER( T(strb) r3, [r0], #1) @ May fault 220USER( TUSER( strb) r3, [r0], #1) @ May fault
221 movge r3, r7, get_byte_3 221 movge r3, r7, get_byte_3
222USER( T(strgeb) r3, [r0], #1) @ May fault 222USER( TUSER( strgeb) r3, [r0], #1) @ May fault
223 ldrgtb r3, [r1], #0 223 ldrgtb r3, [r1], #0
224USER( T(strgtb) r3, [r0], #1) @ May fault 224USER( TUSER( strgtb) r3, [r0], #1) @ May fault
225 b .Lc2u_finished 225 b .Lc2u_finished
226 226
227.Lc2u_3fupi: subs r2, r2, #4 227.Lc2u_3fupi: subs r2, r2, #4
@@ -230,7 +230,7 @@ USER( T(strgtb) r3, [r0], #1) @ May fault
230 mov r3, r7, pull #24 230 mov r3, r7, pull #24
231 ldr r7, [r1], #4 231 ldr r7, [r1], #4
232 orr r3, r3, r7, push #8 232 orr r3, r3, r7, push #8
233USER( T(str) r3, [r0], #4) @ May fault 233USER( TUSER( str) r3, [r0], #4) @ May fault
234 mov ip, r0, lsl #32 - PAGE_SHIFT 234 mov ip, r0, lsl #32 - PAGE_SHIFT
235 rsb ip, ip, #0 235 rsb ip, ip, #0
236 movs ip, ip, lsr #32 - PAGE_SHIFT 236 movs ip, ip, lsr #32 - PAGE_SHIFT
@@ -265,18 +265,18 @@ USER( T(str) r3, [r0], #4) @ May fault
265 movne r3, r7, pull #24 265 movne r3, r7, pull #24
266 ldrne r7, [r1], #4 266 ldrne r7, [r1], #4
267 orrne r3, r3, r7, push #8 267 orrne r3, r3, r7, push #8
268 T(strne) r3, [r0], #4 @ Shouldnt fault 268 TUSER( strne) r3, [r0], #4 @ Shouldnt fault
269 ands ip, ip, #3 269 ands ip, ip, #3
270 beq .Lc2u_3fupi 270 beq .Lc2u_3fupi
271.Lc2u_3nowords: mov r3, r7, get_byte_3 271.Lc2u_3nowords: mov r3, r7, get_byte_3
272 teq ip, #0 272 teq ip, #0
273 beq .Lc2u_finished 273 beq .Lc2u_finished
274 cmp ip, #2 274 cmp ip, #2
275USER( T(strb) r3, [r0], #1) @ May fault 275USER( TUSER( strb) r3, [r0], #1) @ May fault
276 ldrgeb r3, [r1], #1 276 ldrgeb r3, [r1], #1
277USER( T(strgeb) r3, [r0], #1) @ May fault 277USER( TUSER( strgeb) r3, [r0], #1) @ May fault
278 ldrgtb r3, [r1], #0 278 ldrgtb r3, [r1], #0
279USER( T(strgtb) r3, [r0], #1) @ May fault 279USER( TUSER( strgtb) r3, [r0], #1) @ May fault
280 b .Lc2u_finished 280 b .Lc2u_finished
281ENDPROC(__copy_to_user) 281ENDPROC(__copy_to_user)
282 282
@@ -295,11 +295,11 @@ ENDPROC(__copy_to_user)
295.Lcfu_dest_not_aligned: 295.Lcfu_dest_not_aligned:
296 rsb ip, ip, #4 296 rsb ip, ip, #4
297 cmp ip, #2 297 cmp ip, #2
298USER( T(ldrb) r3, [r1], #1) @ May fault 298USER( TUSER( ldrb) r3, [r1], #1) @ May fault
299 strb r3, [r0], #1 299 strb r3, [r0], #1
300USER( T(ldrgeb) r3, [r1], #1) @ May fault 300USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
301 strgeb r3, [r0], #1 301 strgeb r3, [r0], #1
302USER( T(ldrgtb) r3, [r1], #1) @ May fault 302USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
303 strgtb r3, [r0], #1 303 strgtb r3, [r0], #1
304 sub r2, r2, ip 304 sub r2, r2, ip
305 b .Lcfu_dest_aligned 305 b .Lcfu_dest_aligned
@@ -322,7 +322,7 @@ ENTRY(__copy_from_user)
322.Lcfu_0fupi: subs r2, r2, #4 322.Lcfu_0fupi: subs r2, r2, #4
323 addmi ip, r2, #4 323 addmi ip, r2, #4
324 bmi .Lcfu_0nowords 324 bmi .Lcfu_0nowords
325USER( T(ldr) r3, [r1], #4) 325USER( TUSER( ldr) r3, [r1], #4)
326 str r3, [r0], #4 326 str r3, [r0], #4
327 mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 327 mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
328 rsb ip, ip, #0 328 rsb ip, ip, #0
@@ -351,18 +351,18 @@ USER( T(ldr) r3, [r1], #4)
351 ldmneia r1!, {r3 - r4} @ Shouldnt fault 351 ldmneia r1!, {r3 - r4} @ Shouldnt fault
352 stmneia r0!, {r3 - r4} 352 stmneia r0!, {r3 - r4}
353 tst ip, #4 353 tst ip, #4
354 T(ldrne) r3, [r1], #4 @ Shouldnt fault 354 TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault
355 strne r3, [r0], #4 355 strne r3, [r0], #4
356 ands ip, ip, #3 356 ands ip, ip, #3
357 beq .Lcfu_0fupi 357 beq .Lcfu_0fupi
358.Lcfu_0nowords: teq ip, #0 358.Lcfu_0nowords: teq ip, #0
359 beq .Lcfu_finished 359 beq .Lcfu_finished
360.Lcfu_nowords: cmp ip, #2 360.Lcfu_nowords: cmp ip, #2
361USER( T(ldrb) r3, [r1], #1) @ May fault 361USER( TUSER( ldrb) r3, [r1], #1) @ May fault
362 strb r3, [r0], #1 362 strb r3, [r0], #1
363USER( T(ldrgeb) r3, [r1], #1) @ May fault 363USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
364 strgeb r3, [r0], #1 364 strgeb r3, [r0], #1
365USER( T(ldrgtb) r3, [r1], #1) @ May fault 365USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
366 strgtb r3, [r0], #1 366 strgtb r3, [r0], #1
367 b .Lcfu_finished 367 b .Lcfu_finished
368 368
@@ -375,7 +375,7 @@ USER( T(ldrgtb) r3, [r1], #1) @ May fault
375 375
376.Lcfu_src_not_aligned: 376.Lcfu_src_not_aligned:
377 bic r1, r1, #3 377 bic r1, r1, #3
378USER( T(ldr) r7, [r1], #4) @ May fault 378USER( TUSER( ldr) r7, [r1], #4) @ May fault
379 cmp ip, #2 379 cmp ip, #2
380 bgt .Lcfu_3fupi 380 bgt .Lcfu_3fupi
381 beq .Lcfu_2fupi 381 beq .Lcfu_2fupi
@@ -383,7 +383,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault
383 addmi ip, r2, #4 383 addmi ip, r2, #4
384 bmi .Lcfu_1nowords 384 bmi .Lcfu_1nowords
385 mov r3, r7, pull #8 385 mov r3, r7, pull #8
386USER( T(ldr) r7, [r1], #4) @ May fault 386USER( TUSER( ldr) r7, [r1], #4) @ May fault
387 orr r3, r3, r7, push #24 387 orr r3, r3, r7, push #24
388 str r3, [r0], #4 388 str r3, [r0], #4
389 mov ip, r1, lsl #32 - PAGE_SHIFT 389 mov ip, r1, lsl #32 - PAGE_SHIFT
@@ -418,7 +418,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault
418 stmneia r0!, {r3 - r4} 418 stmneia r0!, {r3 - r4}
419 tst ip, #4 419 tst ip, #4
420 movne r3, r7, pull #8 420 movne r3, r7, pull #8
421USER( T(ldrne) r7, [r1], #4) @ May fault 421USER( TUSER( ldrne) r7, [r1], #4) @ May fault
422 orrne r3, r3, r7, push #24 422 orrne r3, r3, r7, push #24
423 strne r3, [r0], #4 423 strne r3, [r0], #4
424 ands ip, ip, #3 424 ands ip, ip, #3
@@ -438,7 +438,7 @@ USER( T(ldrne) r7, [r1], #4) @ May fault
438 addmi ip, r2, #4 438 addmi ip, r2, #4
439 bmi .Lcfu_2nowords 439 bmi .Lcfu_2nowords
440 mov r3, r7, pull #16 440 mov r3, r7, pull #16
441USER( T(ldr) r7, [r1], #4) @ May fault 441USER( TUSER( ldr) r7, [r1], #4) @ May fault
442 orr r3, r3, r7, push #16 442 orr r3, r3, r7, push #16
443 str r3, [r0], #4 443 str r3, [r0], #4
444 mov ip, r1, lsl #32 - PAGE_SHIFT 444 mov ip, r1, lsl #32 - PAGE_SHIFT
@@ -474,7 +474,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault
474 stmneia r0!, {r3 - r4} 474 stmneia r0!, {r3 - r4}
475 tst ip, #4 475 tst ip, #4
476 movne r3, r7, pull #16 476 movne r3, r7, pull #16
477USER( T(ldrne) r7, [r1], #4) @ May fault 477USER( TUSER( ldrne) r7, [r1], #4) @ May fault
478 orrne r3, r3, r7, push #16 478 orrne r3, r3, r7, push #16
479 strne r3, [r0], #4 479 strne r3, [r0], #4
480 ands ip, ip, #3 480 ands ip, ip, #3
@@ -486,7 +486,7 @@ USER( T(ldrne) r7, [r1], #4) @ May fault
486 strb r3, [r0], #1 486 strb r3, [r0], #1
487 movge r3, r7, get_byte_3 487 movge r3, r7, get_byte_3
488 strgeb r3, [r0], #1 488 strgeb r3, [r0], #1
489USER( T(ldrgtb) r3, [r1], #0) @ May fault 489USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault
490 strgtb r3, [r0], #1 490 strgtb r3, [r0], #1
491 b .Lcfu_finished 491 b .Lcfu_finished
492 492
@@ -494,7 +494,7 @@ USER( T(ldrgtb) r3, [r1], #0) @ May fault
494 addmi ip, r2, #4 494 addmi ip, r2, #4
495 bmi .Lcfu_3nowords 495 bmi .Lcfu_3nowords
496 mov r3, r7, pull #24 496 mov r3, r7, pull #24
497USER( T(ldr) r7, [r1], #4) @ May fault 497USER( TUSER( ldr) r7, [r1], #4) @ May fault
498 orr r3, r3, r7, push #8 498 orr r3, r3, r7, push #8
499 str r3, [r0], #4 499 str r3, [r0], #4
500 mov ip, r1, lsl #32 - PAGE_SHIFT 500 mov ip, r1, lsl #32 - PAGE_SHIFT
@@ -529,7 +529,7 @@ USER( T(ldr) r7, [r1], #4) @ May fault
529 stmneia r0!, {r3 - r4} 529 stmneia r0!, {r3 - r4}
530 tst ip, #4 530 tst ip, #4
531 movne r3, r7, pull #24 531 movne r3, r7, pull #24
532USER( T(ldrne) r7, [r1], #4) @ May fault 532USER( TUSER( ldrne) r7, [r1], #4) @ May fault
533 orrne r3, r3, r7, push #8 533 orrne r3, r3, r7, push #8
534 strne r3, [r0], #4 534 strne r3, [r0], #4
535 ands ip, ip, #3 535 ands ip, ip, #3
@@ -539,9 +539,9 @@ USER( T(ldrne) r7, [r1], #4) @ May fault
539 beq .Lcfu_finished 539 beq .Lcfu_finished
540 cmp ip, #2 540 cmp ip, #2
541 strb r3, [r0], #1 541 strb r3, [r0], #1
542USER( T(ldrgeb) r3, [r1], #1) @ May fault 542USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault
543 strgeb r3, [r0], #1 543 strgeb r3, [r0], #1
544USER( T(ldrgtb) r3, [r1], #1) @ May fault 544USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault
545 strgtb r3, [r0], #1 545 strgtb r3, [r0], #1
546 b .Lcfu_finished 546 b .Lcfu_finished
547ENDPROC(__copy_from_user) 547ENDPROC(__copy_from_user)