1 #include <linux/config.h> /* for CONFIG_ARCH_xxxx */
2 #include <linux/linkage.h>
4 #include <asm/assembler.h>
5 #include <asm/constants.h>
7 #include <asm/hardware.h>
8 #include <asm/arch/irqs.h>
9 #include <asm/arch/entry-macro.S>
12 #ifdef CONFIG_FRAME_POINTER
22 #define BAD_PREFETCH 0
24 #define BAD_ADDREXCPTN 2
26 #define BAD_UNDEFINSTR 4
29 @ Most of the stack format comes from struct pt_regs, but with
30 @ the addition of 8 bytes for storing syscall args 5 and 6.
35 * The SWI code relies on the fact that R0 is at the bottom of the stack
36 * (due to slow/fast restore user regs).
42 #if __LINUX_ARM_ARCH__ >= 6
52 msr cpsr_c, #PSR_I_BIT | SVC_MODE
60 .macro get_thread_info, rd
65 .macro alignment_trap, rbase, rtemp, sym
66 #ifdef CONFIG_ALIGNMENT_TRAP
67 #define OFF_CR_ALIGNMENT(x) cr_alignment - x
69 ldr \rtemp, [\rbase, #OFF_CR_ALIGNMENT(\sym)]
70 mcr p15, 0, \rtemp, c1, c0
76 * These are the registers used in the syscall handler, and allow us to
77 * have in theory up to 7 arguments to a function - r0 to r6.
79 * r7 is reserved for the system call number for thumb mode.
81 * Note that tbl == why is intentional.
83 * We must set at least "tsk" and "why" when calling ret_with_reschedule.
85 scno .req r7 @ syscall number
86 tbl .req r8 @ syscall table pointer
87 why .req r8 @ Linux syscall (!= 0)
88 tsk .req r9 @ current thread_info