diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-26 14:18:59 (GMT) |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-26 14:18:59 (GMT) |
commit | 925c8a1a8cb9d7a33a8e39516d7fb679030553fc (patch) | |
tree | 47cefc6d9eb3d8d81613e3fbd790a22d1edb23b1 /arch/arm/kernel/entry-header.S | |
parent | 1ec42c0c97186fadc48810ccaf2dc573cd957ea1 (diff) | |
download | linux-925c8a1a8cb9d7a33a8e39516d7fb679030553fc.tar.xz |
[PATCH] ARM: pt_regs offsets
Generate pt_regs S_xx offsets from the structure itself instead
of #defining them.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-header.S')
-rw-r--r-- | arch/arm/kernel/entry-header.S | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 109f4f1..9d4d286 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -39,30 +39,19 @@ #define ARMSWI_OFFSET 0x000f0000 @ -@ Stack format (ensured by USER_* and SVC_*) +@ Most of the stack format comes from struct pt_regs, but with +@ the addition of 8 bytes for storing syscall args 5 and 6. @ -#define S_FRAME_SIZE 72 -#define S_OLD_R0 68 -#define S_PSR 64 - -#define S_PC 60 -#define S_LR 56 -#define S_SP 52 -#define S_IP 48 -#define S_FP 44 -#define S_R10 40 -#define S_R9 36 -#define S_R8 32 -#define S_R7 28 -#define S_R6 24 -#define S_R5 20 -#define S_R4 16 -#define S_R3 12 -#define S_R2 8 -#define S_R1 4 -#define S_R0 0 #define S_OFF 8 +/* + * The SWI code relies on the fact that R0 is at the bottom of the stack + * (due to slow/fast restore user regs). + */ +#if S_R0 != 0 +#error "Please fix" +#endif + #if __LINUX_ARM_ARCH__ >= 6 .macro disable_irq cpsid i |