Let gcc align 'struct pt_regs' on 8 bytes boundary
PATCH 1/1 Let gcc align 'struct pt_regs' on 8 bytes boundary
From: Franck Bui-Huu <[email protected]>
The stack pointer in MIPS/gcc should always 8 bytes aligned on entry to any routines. Therefore pt_regs structure must be aligned to 8-byte boundary too.
Instead of creating dummy fields to achieve this alignment, this patch let gcc doing it. Therefore 'smtc_pad' field can be safely removed.
Signed-off-by Franck Bui-Huu <[email protected]>
--- include/asm-mips/ptrace.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
include/asm-mips/ptrace.h +1 -2
@@ -44,9 +44,8 @@ #endifunsigned long cp0_epc;#ifdef CONFIG_MIPS_MT_SMTC unsigned long cp0_tcstatus; -unsigned long smtc_pad;#endif /* CONFIG_MIPS_MT_SMTC */ -}; +} __attribute__ ((aligned (8)));/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ #define PTRACE_GETREGS 12
Signature · 1 line
1.4.2.1