diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 20 | ||||
-rw-r--r-- | arch/arm/kernel/entry-common.S | 7 | ||||
-rw-r--r-- | arch/arm/kernel/entry-header.S | 31 |
3 files changed, 30 insertions, 28 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 99d43259ff89..c1ff4d1f1bfd 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -64,6 +64,26 @@ int main(void) | |||
64 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); | 64 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); |
65 | DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7); | 65 | DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7); |
66 | BLANK(); | 66 | BLANK(); |
67 | DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); | ||
68 | DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); | ||
69 | DEFINE(S_R2, offsetof(struct pt_regs, ARM_r2)); | ||
70 | DEFINE(S_R3, offsetof(struct pt_regs, ARM_r3)); | ||
71 | DEFINE(S_R4, offsetof(struct pt_regs, ARM_r4)); | ||
72 | DEFINE(S_R5, offsetof(struct pt_regs, ARM_r5)); | ||
73 | DEFINE(S_R6, offsetof(struct pt_regs, ARM_r6)); | ||
74 | DEFINE(S_R7, offsetof(struct pt_regs, ARM_r7)); | ||
75 | DEFINE(S_R8, offsetof(struct pt_regs, ARM_r8)); | ||
76 | DEFINE(S_R9, offsetof(struct pt_regs, ARM_r9)); | ||
77 | DEFINE(S_R10, offsetof(struct pt_regs, ARM_r10)); | ||
78 | DEFINE(S_FP, offsetof(struct pt_regs, ARM_fp)); | ||
79 | DEFINE(S_IP, offsetof(struct pt_regs, ARM_ip)); | ||
80 | DEFINE(S_SP, offsetof(struct pt_regs, ARM_sp)); | ||
81 | DEFINE(S_LR, offsetof(struct pt_regs, ARM_lr)); | ||
82 | DEFINE(S_PC, offsetof(struct pt_regs, ARM_pc)); | ||
83 | DEFINE(S_PSR, offsetof(struct pt_regs, ARM_cpsr)); | ||
84 | DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0)); | ||
85 | DEFINE(S_FRAME_SIZE, sizeof(struct pt_regs)); | ||
86 | BLANK(); | ||
67 | #if __LINUX_ARM_ARCH__ >= 6 | 87 | #if __LINUX_ARM_ARCH__ >= 6 |
68 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); | 88 | DEFINE(MM_CONTEXT_ID, offsetof(struct mm_struct, context.id)); |
69 | BLANK(); | 89 | BLANK(); |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 0cd9f7bcaad7..55201db0f144 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -15,13 +15,6 @@ | |||
15 | 15 | ||
16 | #include "entry-header.S" | 16 | #include "entry-header.S" |
17 | 17 | ||
18 | /* | ||
19 | * We rely on the fact that R0 is at the bottom of the stack (due to | ||
20 | * slow/fast restore user regs). | ||
21 | */ | ||
22 | #if S_R0 != 0 | ||
23 | #error "Please fix" | ||
24 | #endif | ||
25 | 18 | ||
26 | .align 5 | 19 | .align 5 |
27 | /* | 20 | /* |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 109f4f10d314..9d4d286d3808 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -39,30 +39,19 @@ | |||
39 | #define ARMSWI_OFFSET 0x000f0000 | 39 | #define ARMSWI_OFFSET 0x000f0000 |
40 | 40 | ||
41 | @ | 41 | @ |
42 | @ Stack format (ensured by USER_* and SVC_*) | 42 | @ Most of the stack format comes from struct pt_regs, but with |
43 | @ the addition of 8 bytes for storing syscall args 5 and 6. | ||
43 | @ | 44 | @ |
44 | #define S_FRAME_SIZE 72 | ||
45 | #define S_OLD_R0 68 | ||
46 | #define S_PSR 64 | ||
47 | |||
48 | #define S_PC 60 | ||
49 | #define S_LR 56 | ||
50 | #define S_SP 52 | ||
51 | #define S_IP 48 | ||
52 | #define S_FP 44 | ||
53 | #define S_R10 40 | ||
54 | #define S_R9 36 | ||
55 | #define S_R8 32 | ||
56 | #define S_R7 28 | ||
57 | #define S_R6 24 | ||
58 | #define S_R5 20 | ||
59 | #define S_R4 16 | ||
60 | #define S_R3 12 | ||
61 | #define S_R2 8 | ||
62 | #define S_R1 4 | ||
63 | #define S_R0 0 | ||
64 | #define S_OFF 8 | 45 | #define S_OFF 8 |
65 | 46 | ||
47 | /* | ||
48 | * The SWI code relies on the fact that R0 is at the bottom of the stack | ||
49 | * (due to slow/fast restore user regs). | ||
50 | */ | ||
51 | #if S_R0 != 0 | ||
52 | #error "Please fix" | ||
53 | #endif | ||
54 | |||
66 | #if __LINUX_ARM_ARCH__ >= 6 | 55 | #if __LINUX_ARM_ARCH__ >= 6 |
67 | .macro disable_irq | 56 | .macro disable_irq |
68 | cpsid i | 57 | cpsid i |