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.
22 @ This _must_ remain a multiple of 8 for EABI.
27 * The SWI code relies on the fact that R0 is at the bottom of the stack
28 * (due to slow/fast restore user regs).
35 #ifdef CONFIG_FRAME_POINTER
40 .macro get_thread_info, rd
45 .macro alignment_trap, rtemp
46 #ifdef CONFIG_ALIGNMENT_TRAP
47 ldr \rtemp, .LCcralign
49 mcr p15, 0, \rtemp, c1, c0
55 * These are the registers used in the syscall handler, and allow us to
56 * have in theory up to 7 arguments to a function - r0 to r6.
58 * r7 is reserved for the system call number for thumb mode.
60 * Note that tbl == why is intentional.
62 * We must set at least "tsk" and "why" when calling ret_with_reschedule.
64 scno .req r7 @ syscall number
65 tbl .req r8 @ syscall table pointer
66 why .req r8 @ Linux syscall (!= 0)
67 tsk .req r9 @ current thread_info