diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-26 09:42:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-02 05:56:11 -0400 |
commit | 0d147db0c127c561f8f9ead9f3c1ec38f89f1040 (patch) | |
tree | ed499217d06bd42fc70bfcd7d3c0ae8ee05bc0b8 /arch/arm/mm/abort-lv4t.S | |
parent | 3e287bec6fde088bff05ee7f998f53e8ac75b922 (diff) |
ARM: entry: data abort: avoid using r2 in abort helpers
This allows us to pass the pt_regs pointer in to these functions
ready for tail-calling the abort handler.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/abort-lv4t.S')
-rw-r--r-- | arch/arm/mm/abort-lv4t.S | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mm/abort-lv4t.S b/arch/arm/mm/abort-lv4t.S index fea7514225a..d032b1f2067 100644 --- a/arch/arm/mm/abort-lv4t.S +++ b/arch/arm/mm/abort-lv4t.S | |||
@@ -64,12 +64,12 @@ ENTRY(v4t_late_abort) | |||
64 | mov r7, #0x11 | 64 | mov r7, #0x11 |
65 | orr r7, r7, #0x1100 | 65 | orr r7, r7, #0x1100 |
66 | and r6, r8, r7 | 66 | and r6, r8, r7 |
67 | and r2, r8, r7, lsl #1 | 67 | and r9, r8, r7, lsl #1 |
68 | add r6, r6, r2, lsr #1 | 68 | add r6, r6, r9, lsr #1 |
69 | and r2, r8, r7, lsl #2 | 69 | and r9, r8, r7, lsl #2 |
70 | add r6, r6, r2, lsr #2 | 70 | add r6, r6, r9, lsr #2 |
71 | and r2, r8, r7, lsl #3 | 71 | and r9, r8, r7, lsl #3 |
72 | add r6, r6, r2, lsr #3 | 72 | add r6, r6, r9, lsr #3 |
73 | add r6, r6, r6, lsr #8 | 73 | add r6, r6, r6, lsr #8 |
74 | add r6, r6, r6, lsr #4 | 74 | add r6, r6, r6, lsr #4 |
75 | and r6, r6, #15 @ r6 = no. of registers to transfer. | 75 | and r6, r6, #15 @ r6 = no. of registers to transfer. |
@@ -103,13 +103,13 @@ ENTRY(v4t_late_abort) | |||
103 | tst r8, #1 << 21 @ check writeback bit | 103 | tst r8, #1 << 21 @ check writeback bit |
104 | moveq pc, lr @ no writeback -> no fixup | 104 | moveq pc, lr @ no writeback -> no fixup |
105 | .data_arm_lateldrpostconst: | 105 | .data_arm_lateldrpostconst: |
106 | movs r2, r8, lsl #20 @ Get offset | 106 | movs r9, r8, lsl #20 @ Get offset |
107 | moveq pc, lr @ zero -> no fixup | 107 | moveq pc, lr @ zero -> no fixup |
108 | and r5, r8, #15 << 16 @ Extract 'n' from instruction | 108 | and r5, r8, #15 << 16 @ Extract 'n' from instruction |
109 | ldr r7, [sp, r5, lsr #14] @ Get register 'Rn' | 109 | ldr r7, [sp, r5, lsr #14] @ Get register 'Rn' |
110 | tst r8, #1 << 23 @ Check U bit | 110 | tst r8, #1 << 23 @ Check U bit |
111 | subne r7, r7, r2, lsr #20 @ Undo increment | 111 | subne r7, r7, r9, lsr #20 @ Undo increment |
112 | addeq r7, r7, r2, lsr #20 @ Undo decrement | 112 | addeq r7, r7, r9, lsr #20 @ Undo decrement |
113 | str r7, [sp, r5, lsr #14] @ Put register 'Rn' | 113 | str r7, [sp, r5, lsr #14] @ Put register 'Rn' |
114 | mov pc, lr | 114 | mov pc, lr |
115 | 115 | ||
@@ -194,11 +194,11 @@ ENTRY(v4t_late_abort) | |||
194 | tst r8, #1 << 10 | 194 | tst r8, #1 << 10 |
195 | beq .data_unknown | 195 | beq .data_unknown |
196 | and r6, r8, #0x55 @ hweight8(r8) + R bit | 196 | and r6, r8, #0x55 @ hweight8(r8) + R bit |
197 | and r2, r8, #0xaa | 197 | and r9, r8, #0xaa |
198 | add r6, r6, r2, lsr #1 | 198 | add r6, r6, r9, lsr #1 |
199 | and r2, r6, #0xcc | 199 | and r9, r6, #0xcc |
200 | and r6, r6, #0x33 | 200 | and r6, r6, #0x33 |
201 | add r6, r6, r2, lsr #2 | 201 | add r6, r6, r9, lsr #2 |
202 | movs r7, r8, lsr #9 @ C = r8 bit 8 (R bit) | 202 | movs r7, r8, lsr #9 @ C = r8 bit 8 (R bit) |
203 | adc r6, r6, r6, lsr #4 @ high + low nibble + R bit | 203 | adc r6, r6, r6, lsr #4 @ high + low nibble + R bit |
204 | and r6, r6, #15 @ number of regs to transfer | 204 | and r6, r6, #15 @ number of regs to transfer |
@@ -211,11 +211,11 @@ ENTRY(v4t_late_abort) | |||
211 | 211 | ||
212 | .data_thumb_ldmstm: | 212 | .data_thumb_ldmstm: |
213 | and r6, r8, #0x55 @ hweight8(r8) | 213 | and r6, r8, #0x55 @ hweight8(r8) |
214 | and r2, r8, #0xaa | 214 | and r9, r8, #0xaa |
215 | add r6, r6, r2, lsr #1 | 215 | add r6, r6, r9, lsr #1 |
216 | and r2, r6, #0xcc | 216 | and r9, r6, #0xcc |
217 | and r6, r6, #0x33 | 217 | and r6, r6, #0x33 |
218 | add r6, r6, r2, lsr #2 | 218 | add r6, r6, r9, lsr #2 |
219 | add r6, r6, r6, lsr #4 | 219 | add r6, r6, r6, lsr #4 |
220 | and r5, r8, #7 << 8 | 220 | and r5, r8, #7 << 8 |
221 | ldr r7, [sp, r5, lsr #6] | 221 | ldr r7, [sp, r5, lsr #6] |