entry-common.S (320424c7d44f54c18df9812fd7c45f6963524002) | entry-common.S (4e57a4ddf6b0d9cce1cf2ffd153df1ad3c2c9cc2) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * linux/arch/arm/kernel/entry-common.S 4 * 5 * Copyright (C) 2000 Russell King 6 */ 7 8#include <asm/assembler.h> --- 212 unchanged lines hidden (view full) --- 221#else 222 /* Legacy ABI only. */ 223 USER( ldr scno, [saved_pc, #-4] ) @ get SWI instruction 224#endif 225 226 /* saved_psr and saved_pc are now dead */ 227 228 uaccess_disable tbl | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * linux/arch/arm/kernel/entry-common.S 4 * 5 * Copyright (C) 2000 Russell King 6 */ 7 8#include <asm/assembler.h> --- 212 unchanged lines hidden (view full) --- 221#else 222 /* Legacy ABI only. */ 223 USER( ldr scno, [saved_pc, #-4] ) @ get SWI instruction 224#endif 225 226 /* saved_psr and saved_pc are now dead */ 227 228 uaccess_disable tbl |
229 get_thread_info tsk |
|
229 230 adr tbl, sys_call_table @ load syscall table pointer 231 232#if defined(CONFIG_OABI_COMPAT) 233 /* 234 * If the swi argument is zero, this is an EABI call and we do nothing. 235 * 236 * If this is an old ABI call, get the syscall number into scno and 237 * get the old ABI syscall table address. 238 */ 239 bics r10, r10, #0xff000000 | 230 231 adr tbl, sys_call_table @ load syscall table pointer 232 233#if defined(CONFIG_OABI_COMPAT) 234 /* 235 * If the swi argument is zero, this is an EABI call and we do nothing. 236 * 237 * If this is an old ABI call, get the syscall number into scno and 238 * get the old ABI syscall table address. 239 */ 240 bics r10, r10, #0xff000000 |
241 strne r10, [tsk, #TI_ABI_SYSCALL] 242 streq scno, [tsk, #TI_ABI_SYSCALL] |
|
240 eorne scno, r10, #__NR_OABI_SYSCALL_BASE 241 ldrne tbl, =sys_oabi_call_table 242#elif !defined(CONFIG_AEABI) 243 bic scno, scno, #0xff000000 @ mask off SWI op-code | 243 eorne scno, r10, #__NR_OABI_SYSCALL_BASE 244 ldrne tbl, =sys_oabi_call_table 245#elif !defined(CONFIG_AEABI) 246 bic scno, scno, #0xff000000 @ mask off SWI op-code |
247 str scno, [tsk, #TI_ABI_SYSCALL] |
|
244 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number | 248 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number |
249#else 250 str scno, [tsk, #TI_ABI_SYSCALL] |
|
245#endif | 251#endif |
246 get_thread_info tsk | |
247 /* 248 * Reload the registers that may have been corrupted on entry to 249 * the syscall assembly (by tracing or context tracking.) 250 */ 251 TRACE( ldmia sp, {r0 - r3} ) 252 253local_restart: 254 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing --- 28 unchanged lines hidden (view full) --- 283#endif 284ENDPROC(vector_swi) 285 286 /* 287 * This is the really slow path. We're going to be doing 288 * context switches, and waiting for our parent to respond. 289 */ 290__sys_trace: | 252 /* 253 * Reload the registers that may have been corrupted on entry to 254 * the syscall assembly (by tracing or context tracking.) 255 */ 256 TRACE( ldmia sp, {r0 - r3} ) 257 258local_restart: 259 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing --- 28 unchanged lines hidden (view full) --- 288#endif 289ENDPROC(vector_swi) 290 291 /* 292 * This is the really slow path. We're going to be doing 293 * context switches, and waiting for our parent to respond. 294 */ 295__sys_trace: |
291 mov r1, scno | |
292 add r0, sp, #S_OFF 293 bl syscall_trace_enter 294 mov scno, r0 295 invoke_syscall tbl, scno, r10, __sys_trace_return, reload=1 296 cmp scno, #-1 @ skip the syscall? 297 bne 2b 298 add sp, sp, #S_OFF @ restore stack 299 --- 164 unchanged lines hidden --- | 296 add r0, sp, #S_OFF 297 bl syscall_trace_enter 298 mov scno, r0 299 invoke_syscall tbl, scno, r10, __sys_trace_return, reload=1 300 cmp scno, #-1 @ skip the syscall? 301 bne 2b 302 add sp, sp, #S_OFF @ restore stack 303 --- 164 unchanged lines hidden --- |