1 #include <linux/init.h>
2 #include <linux/linkage.h>
4 #include <asm/assembler.h>
5 #include <asm/asm-offsets.h>
7 #include <asm/thread_info.h>
12 #define BAD_PREFETCH 0
14 #define BAD_ADDREXCPTN 2
16 #define BAD_UNDEFINSTR 4
19 @ Most of the stack format comes from struct pt_regs, but with
20 @ the addition of 8 bytes for storing syscall args 5 and 6.
21 @ This _must_ remain a multiple of 8 for EABI.
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 .macro get_thread_info, rd
44 .macro alignment_trap, rtemp
45 #ifdef CONFIG_ALIGNMENT_TRAP
46 ldr \rtemp, .LCcralign
48 mcr p15, 0, \rtemp, c1, c0
54 * These are the registers used in the syscall handler, and allow us to
55 * have in theory up to 7 arguments to a function - r0 to r6.
57 * r7 is reserved for the system call number for thumb mode.
59 * Note that tbl == why is intentional.
61 * We must set at least "tsk" and "why" when calling ret_with_reschedule.
63 scno .req r7 @ syscall number
64 tbl .req r8 @ syscall table pointer
65 why .req r8 @ Linux syscall (!= 0)
66 tsk .req r9 @ current thread_info