aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S20
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 55201db0f144..65c58b34db97 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -111,7 +111,17 @@ ENTRY(ret_from_fork)
111ENTRY(vector_swi) 111ENTRY(vector_swi)
112 save_user_regs 112 save_user_regs
113 zero_fp 113 zero_fp
114 get_scno 114
115 /*
116 * Get the system call number.
117 */
118#ifdef CONFIG_ARM_THUMB
119 tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs
120 addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in
121 ldreq scno, [lr, #-4]
122#else
123 ldr scno, [lr, #-4] @ get SWI instruction
124#endif
115 arm710_bug_check scno, ip 125 arm710_bug_check scno, ip
116 126
117#ifdef CONFIG_ALIGNMENT_TRAP 127#ifdef CONFIG_ALIGNMENT_TRAP
@@ -126,7 +136,7 @@ ENTRY(vector_swi)
126 get_thread_info tsk 136 get_thread_info tsk
127 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing 137 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
128 bic scno, scno, #0xff000000 @ mask off SWI op-code 138 bic scno, scno, #0xff000000 @ mask off SWI op-code
129 eor scno, scno, #OS_NUMBER << 20 @ check OS number 139 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
130 adr tbl, sys_call_table @ load syscall table pointer 140 adr tbl, sys_call_table @ load syscall table pointer
131 tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? 141 tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
132 bne __sys_trace 142 bne __sys_trace
@@ -137,8 +147,8 @@ ENTRY(vector_swi)
137 147
138 add r1, sp, #S_OFF 148 add r1, sp, #S_OFF
1392: mov why, #0 @ no longer a real syscall 1492: mov why, #0 @ no longer a real syscall
140 cmp scno, #ARMSWI_OFFSET 150 cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
141 eor r0, scno, #OS_NUMBER << 20 @ put OS number back 151 eor r0, scno, #__NR_SYSCALL_BASE @ put OS number back
142 bcs arm_syscall 152 bcs arm_syscall
143 b sys_ni_syscall @ not private func 153 b sys_ni_syscall @ not private func
144 154
@@ -183,7 +193,7 @@ ENTRY(sys_call_table)
183@ r5 = syscall table 193@ r5 = syscall table
184 .type sys_syscall, #function 194 .type sys_syscall, #function
185sys_syscall: 195sys_syscall:
186 eor scno, r0, #OS_NUMBER << 20 196 eor scno, r0, #__NR_SYSCALL_BASE
187 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE 197 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
188 cmpne scno, #NR_syscalls @ check range 198 cmpne scno, #NR_syscalls @ check range
189 stmloia sp, {r5, r6} @ shuffle args 199 stmloia sp, {r5, r6} @ shuffle args