* [PATCH] Let gcc align 'struct pt_regs' on 8 bytes boundary
@ 2006-09-29 9:08 Franck Bui-Huu
0 siblings, 0 replies; only message in thread
From: Franck Bui-Huu @ 2006-09-29 9:08 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
From: Franck Bui-Huu <fbuihuu@gmail.com>
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 <fbuihuu@gmail.com>
---
include/asm-mips/ptrace.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h
index 4fb0fc4..5f3a907 100644
--- a/include/asm-mips/ptrace.h
+++ b/include/asm-mips/ptrace.h
@@ -44,9 +44,8 @@ #endif
unsigned 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
--
1.4.2.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-29 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-29 9:08 [PATCH] Let gcc align 'struct pt_regs' on 8 bytes boundary Franck Bui-Huu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox