aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-header.S
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-26 10:20:34 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-04-26 10:20:34 -0400
commitf4dc9a4cf26278f5b608d6e4bd16e7b27ddcf1a5 (patch)
tree79d956ff351892230ca46e4a30249b446e62daaf /arch/arm/kernel/entry-header.S
parentcf88b417f9b1365c5aeeffa5c41208be68adfd76 (diff)
[PATCH] ARM: Remove single-use user save/restore macros
Assembly macros are pointless if they're only used once. Move them inline. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-header.S')
-rw-r--r--arch/arm/kernel/entry-header.S51
1 files changed, 0 insertions, 51 deletions
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index b7d54a4f98f4..956af0bff3ff 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -57,57 +57,6 @@
57 .endm 57 .endm
58#endif 58#endif
59 59
60 .macro save_user_regs
61 sub sp, sp, #S_FRAME_SIZE
62 stmia sp, {r0 - r12} @ Calling r0 - r12
63 add r8, sp, #S_PC
64 stmdb r8, {sp, lr}^ @ Calling sp, lr
65 mrs r8, spsr @ called from non-FIQ mode, so ok.
66 str lr, [sp, #S_PC] @ Save calling PC
67 str r8, [sp, #S_PSR] @ Save CPSR
68 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
69 .endm
70
71 .macro restore_user_regs
72 ldr r1, [sp, #S_PSR] @ Get calling cpsr
73 disable_irq ip @ disable IRQs
74 ldr lr, [sp, #S_PC]! @ Get PC
75 msr spsr_cxsf, r1 @ save in spsr_svc
76 ldmdb sp, {r0 - lr}^ @ Get calling r0 - lr
77 mov r0, r0
78 add sp, sp, #S_FRAME_SIZE - S_PC
79 movs pc, lr @ return & move spsr_svc into cpsr
80 .endm
81
82/*
83 * Must be called with IRQs already disabled.
84 */
85 .macro fast_restore_user_regs
86 ldr r1, [sp, #S_OFF + S_PSR] @ get calling cpsr
87 ldr lr, [sp, #S_OFF + S_PC]! @ get pc
88 msr spsr_cxsf, r1 @ save in spsr_svc
89 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr
90 mov r0, r0
91 add sp, sp, #S_FRAME_SIZE - S_PC
92 movs pc, lr @ return & move spsr_svc into cpsr
93 .endm
94
95/*
96 * Must be called with IRQs already disabled.
97 */
98 .macro slow_restore_user_regs
99 ldr r1, [sp, #S_PSR] @ get calling cpsr
100 ldr lr, [sp, #S_PC]! @ get pc
101 msr spsr_cxsf, r1 @ save in spsr_svc
102 ldmdb sp, {r0 - lr}^ @ get calling r1 - lr
103 mov r0, r0
104 add sp, sp, #S_FRAME_SIZE - S_PC
105 movs pc, lr @ return & move spsr_svc into cpsr
106 .endm
107
108 .macro mask_pc, rd, rm
109 .endm
110
111 .macro get_thread_info, rd 60 .macro get_thread_info, rd
112 mov \rd, sp, lsr #13 61 mov \rd, sp, lsr #13
113 mov \rd, \rd, lsl #13 62 mov \rd, \rd, lsl #13