1 #include <linux/config.h>
2 #include <linux/init.h>
3 #include <linux/linkage.h>
5 #include <asm/assembler.h>
6 #include <asm/asm-offsets.h>
8 #include <asm/thread_info.h>
13 #define BAD_PREFETCH 0
15 #define BAD_ADDREXCPTN 2
17 #define BAD_UNDEFINSTR 4
20 @ Most of the stack format comes from struct pt_regs, but with
21 @ the addition of 8 bytes for storing syscall args 5 and 6.
26 * The SWI code relies on the fact that R0 is at the bottom of the stack
27 * (due to slow/fast restore user regs).
34 #ifdef CONFIG_FRAME_POINTER
39 #if __LINUX_ARM_ARCH__ >= 6
49 msr cpsr_c, #PSR_I_BIT | SVC_MODE
57 .macro get_thread_info, rd
62 .macro alignment_trap, rtemp
63 #ifdef CONFIG_ALIGNMENT_TRAP
64 ldr \rtemp, .LCcralign
66 mcr p15, 0, \rtemp, c1, c0
72 * These are the registers used in the syscall handler, and allow us to
73 * have in theory up to 7 arguments to a function - r0 to r6.
75 * r7 is reserved for the system call number for thumb mode.
77 * Note that tbl == why is intentional.
79 * We must set at least "tsk" and "why" when calling ret_with_reschedule.
81 scno .req r7 @ syscall number
82 tbl .req r8 @ syscall table pointer
83 why .req r8 @ Linux syscall (!= 0)
84 tsk .req r9 @ current thread_info