Skip to content

Commit

Permalink
[MIPS] Let gcc align 'struct pt_regs' on 8 bytes boundary
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed Oct 3, 2006
1 parent 8ccb3dc commit 0e90f49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/asm-mips/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ struct pt_regs {
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
Expand Down

0 comments on commit 0e90f49

Please sign in to comment.