diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-01-25 05:38:13 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-25 06:07:40 -0500 |
commit | 4e7682d077d693e34a993ae7a2831b522930ebcb (patch) | |
tree | a891a6a1393e3cf7df8e70a6c41579a03475e920 | |
parent | d68133b5a81bd9c4b673c2a731ac1a33a9dc0cb8 (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>
-rw-r--r-- | arch/arm/include/asm/assembler.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/domain.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/futex.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 16 | ||||
-rw-r--r-- | arch/arm/lib/getuser.S | 12 | ||||
-rw-r--r-- | arch/arm/lib/putuser.S | 28 | ||||
-rw-r--r-- | arch/arm/lib/uaccess.S | 82 |
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() |
241 | 9999: | 241 | 9999: |
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 |
282 | 9999: | 282 | 9999: |
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 | ||
33 | ENTRY(__get_user_1) | 33 | ENTRY(__get_user_1) |
34 | 1: T(ldrb) r2, [r0] | 34 | 1: TUSER(ldrb) r2, [r0] |
35 | mov r0, #0 | 35 | mov r0, #0 |
36 | mov pc, lr | 36 | mov pc, lr |
37 | ENDPROC(__get_user_1) | 37 | ENDPROC(__get_user_1) |
38 | 38 | ||
39 | ENTRY(__get_user_2) | 39 | ENTRY(__get_user_2) |
40 | #ifdef CONFIG_THUMB2_KERNEL | 40 | #ifdef CONFIG_THUMB2_KERNEL |
41 | 2: T(ldrb) r2, [r0] | 41 | 2: TUSER(ldrb) r2, [r0] |
42 | 3: T(ldrb) r3, [r0, #1] | 42 | 3: TUSER(ldrb) r3, [r0, #1] |
43 | #else | 43 | #else |
44 | 2: T(ldrb) r2, [r0], #1 | 44 | 2: TUSER(ldrb) r2, [r0], #1 |
45 | 3: T(ldrb) r3, [r0] | 45 | 3: 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) | |||
54 | ENDPROC(__get_user_2) | 54 | ENDPROC(__get_user_2) |
55 | 55 | ||
56 | ENTRY(__get_user_4) | 56 | ENTRY(__get_user_4) |
57 | 4: T(ldr) r2, [r0] | 57 | 4: TUSER(ldr) r2, [r0] |
58 | mov r0, #0 | 58 | mov r0, #0 |
59 | mov pc, lr | 59 | mov pc, lr |
60 | ENDPROC(__get_user_4) | 60 | ENDPROC(__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 | ||
33 | ENTRY(__put_user_1) | 33 | ENTRY(__put_user_1) |
34 | 1: T(strb) r2, [r0] | 34 | 1: TUSER(strb) r2, [r0] |
35 | mov r0, #0 | 35 | mov r0, #0 |
36 | mov pc, lr | 36 | mov pc, lr |
37 | ENDPROC(__put_user_1) | 37 | ENDPROC(__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__ |
43 | 2: T(strb) r2, [r0] | 43 | 2: TUSER(strb) r2, [r0] |
44 | 3: T(strb) ip, [r0, #1] | 44 | 3: TUSER(strb) ip, [r0, #1] |
45 | #else | 45 | #else |
46 | 2: T(strb) ip, [r0] | 46 | 2: TUSER(strb) ip, [r0] |
47 | 3: T(strb) r2, [r0, #1] | 47 | 3: 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__ |
51 | 2: T(strb) r2, [r0], #1 | 51 | 2: TUSER(strb) r2, [r0], #1 |
52 | 3: T(strb) ip, [r0] | 52 | 3: TUSER(strb) ip, [r0] |
53 | #else | 53 | #else |
54 | 2: T(strb) ip, [r0], #1 | 54 | 2: TUSER(strb) ip, [r0], #1 |
55 | 3: T(strb) r2, [r0] | 55 | 3: 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) | |||
60 | ENDPROC(__put_user_2) | 60 | ENDPROC(__put_user_2) |
61 | 61 | ||
62 | ENTRY(__put_user_4) | 62 | ENTRY(__put_user_4) |
63 | 4: T(str) r2, [r0] | 63 | 4: TUSER(str) r2, [r0] |
64 | mov r0, #0 | 64 | mov r0, #0 |
65 | mov pc, lr | 65 | mov pc, lr |
66 | ENDPROC(__put_user_4) | 66 | ENDPROC(__put_user_4) |
67 | 67 | ||
68 | ENTRY(__put_user_8) | 68 | ENTRY(__put_user_8) |
69 | #ifdef CONFIG_THUMB2_KERNEL | 69 | #ifdef CONFIG_THUMB2_KERNEL |
70 | 5: T(str) r2, [r0] | 70 | 5: TUSER(str) r2, [r0] |
71 | 6: T(str) r3, [r0, #4] | 71 | 6: TUSER(str) r3, [r0, #4] |
72 | #else | 72 | #else |
73 | 5: T(str) r2, [r0], #4 | 73 | 5: TUSER(str) r2, [r0], #4 |
74 | 6: T(str) r3, [r0] | 74 | 6: 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 |
35 | USER( T(strb) r3, [r0], #1) @ May fault | 35 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
36 | ldrgeb r3, [r1], #1 | 36 | ldrgeb r3, [r1], #1 |
37 | USER( T(strgeb) r3, [r0], #1) @ May fault | 37 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
38 | ldrgtb r3, [r1], #1 | 38 | ldrgtb r3, [r1], #1 |
39 | USER( T(strgtb) r3, [r0], #1) @ May fault | 39 | USER( 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 |
62 | USER( T(str) r3, [r0], #4) @ May fault | 62 | USER( 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 |
98 | USER( T(strb) r3, [r0], #1) @ May fault | 98 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
99 | ldrgeb r3, [r1], #1 | 99 | ldrgeb r3, [r1], #1 |
100 | USER( T(strgeb) r3, [r0], #1) @ May fault | 100 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
101 | ldrgtb r3, [r1], #1 | 101 | ldrgtb r3, [r1], #1 |
102 | USER( T(strgtb) r3, [r0], #1) @ May fault | 102 | USER( 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 |
123 | USER( T(str) r3, [r0], #4) @ May fault | 123 | USER( 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 |
165 | USER( T(strb) r3, [r0], #1) @ May fault | 165 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
166 | movge r3, r7, get_byte_2 | 166 | movge r3, r7, get_byte_2 |
167 | USER( T(strgeb) r3, [r0], #1) @ May fault | 167 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
168 | movgt r3, r7, get_byte_3 | 168 | movgt r3, r7, get_byte_3 |
169 | USER( T(strgtb) r3, [r0], #1) @ May fault | 169 | USER( 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 |
178 | USER( T(str) r3, [r0], #4) @ May fault | 178 | USER( 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 |
220 | USER( T(strb) r3, [r0], #1) @ May fault | 220 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
221 | movge r3, r7, get_byte_3 | 221 | movge r3, r7, get_byte_3 |
222 | USER( T(strgeb) r3, [r0], #1) @ May fault | 222 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
223 | ldrgtb r3, [r1], #0 | 223 | ldrgtb r3, [r1], #0 |
224 | USER( T(strgtb) r3, [r0], #1) @ May fault | 224 | USER( 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 |
233 | USER( T(str) r3, [r0], #4) @ May fault | 233 | USER( 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 |
275 | USER( T(strb) r3, [r0], #1) @ May fault | 275 | USER( TUSER( strb) r3, [r0], #1) @ May fault |
276 | ldrgeb r3, [r1], #1 | 276 | ldrgeb r3, [r1], #1 |
277 | USER( T(strgeb) r3, [r0], #1) @ May fault | 277 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault |
278 | ldrgtb r3, [r1], #0 | 278 | ldrgtb r3, [r1], #0 |
279 | USER( T(strgtb) r3, [r0], #1) @ May fault | 279 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault |
280 | b .Lc2u_finished | 280 | b .Lc2u_finished |
281 | ENDPROC(__copy_to_user) | 281 | ENDPROC(__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 |
298 | USER( T(ldrb) r3, [r1], #1) @ May fault | 298 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault |
299 | strb r3, [r0], #1 | 299 | strb r3, [r0], #1 |
300 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 300 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
301 | strgeb r3, [r0], #1 | 301 | strgeb r3, [r0], #1 |
302 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 302 | USER( 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 |
325 | USER( T(ldr) r3, [r1], #4) | 325 | USER( 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 |
361 | USER( T(ldrb) r3, [r1], #1) @ May fault | 361 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault |
362 | strb r3, [r0], #1 | 362 | strb r3, [r0], #1 |
363 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 363 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
364 | strgeb r3, [r0], #1 | 364 | strgeb r3, [r0], #1 |
365 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 365 | USER( 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 |
378 | USER( T(ldr) r7, [r1], #4) @ May fault | 378 | USER( 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 |
386 | USER( T(ldr) r7, [r1], #4) @ May fault | 386 | USER( 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 |
421 | USER( T(ldrne) r7, [r1], #4) @ May fault | 421 | USER( 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 |
441 | USER( T(ldr) r7, [r1], #4) @ May fault | 441 | USER( 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 |
477 | USER( T(ldrne) r7, [r1], #4) @ May fault | 477 | USER( 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 |
489 | USER( T(ldrgtb) r3, [r1], #0) @ May fault | 489 | USER( 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 |
497 | USER( T(ldr) r7, [r1], #4) @ May fault | 497 | USER( 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 |
532 | USER( T(ldrne) r7, [r1], #4) @ May fault | 532 | USER( 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 |
542 | USER( T(ldrgeb) r3, [r1], #1) @ May fault | 542 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault |
543 | strgeb r3, [r0], #1 | 543 | strgeb r3, [r0], #1 |
544 | USER( T(ldrgtb) r3, [r1], #1) @ May fault | 544 | USER( 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 |
547 | ENDPROC(__copy_from_user) | 547 | ENDPROC(__copy_from_user) |