aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.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-common.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-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S28
1 files changed, 25 insertions, 3 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 65c58b34db97..07da010b67d4 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -27,7 +27,15 @@ ret_fast_syscall:
27 ldr r1, [tsk, #TI_FLAGS] 27 ldr r1, [tsk, #TI_FLAGS]
28 tst r1, #_TIF_WORK_MASK 28 tst r1, #_TIF_WORK_MASK
29 bne fast_work_pending 29 bne fast_work_pending
30 fast_restore_user_regs 30
31 @ fast_restore_user_regs
32 ldr r1, [sp, #S_OFF + S_PSR] @ get calling cpsr
33 ldr lr, [sp, #S_OFF + S_PC]! @ get pc
34 msr spsr_cxsf, r1 @ save in spsr_svc
35 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr
36 mov r0, r0
37 add sp, sp, #S_FRAME_SIZE - S_PC
38 movs pc, lr @ return & move spsr_svc into cpsr
31 39
32/* 40/*
33 * Ok, we need to do extra processing, enter the slow path. 41 * Ok, we need to do extra processing, enter the slow path.
@@ -57,7 +65,14 @@ ret_slow_syscall:
57 tst r1, #_TIF_WORK_MASK 65 tst r1, #_TIF_WORK_MASK
58 bne work_pending 66 bne work_pending
59no_work_pending: 67no_work_pending:
60 slow_restore_user_regs 68 @ slow_restore_user_regs
69 ldr r1, [sp, #S_PSR] @ get calling cpsr
70 ldr lr, [sp, #S_PC]! @ get pc
71 msr spsr_cxsf, r1 @ save in spsr_svc
72 ldmdb sp, {r0 - lr}^ @ get calling r1 - lr
73 mov r0, r0
74 add sp, sp, #S_FRAME_SIZE - S_PC
75 movs pc, lr @ return & move spsr_svc into cpsr
61 76
62/* 77/*
63 * This is how we return from a fork. 78 * This is how we return from a fork.
@@ -109,7 +124,14 @@ ENTRY(ret_from_fork)
109 124
110 .align 5 125 .align 5
111ENTRY(vector_swi) 126ENTRY(vector_swi)
112 save_user_regs 127 sub sp, sp, #S_FRAME_SIZE
128 stmia sp, {r0 - r12} @ Calling r0 - r12
129 add r8, sp, #S_PC
130 stmdb r8, {sp, lr}^ @ Calling sp, lr
131 mrs r8, spsr @ called from non-FIQ mode, so ok.
132 str lr, [sp, #S_PC] @ Save calling PC
133 str r8, [sp, #S_PSR] @ Save CPSR
134 str r0, [sp, #S_OLD_R0] @ Save OLD_R0
113 zero_fp 135 zero_fp
114 136
115 /* 137 /*