From c0b9bae9d18980afa1797fb7b75adb4fbc837b66 Mon Sep 17 00:00:00 2001 From: Franck Bui-Huu Date: Mon, 5 Feb 2007 15:24:21 +0100 Subject: [MIPS] signal: clean up sigframe structure This patch makes 'struct sigframe' declaration avalaible for all signals code. It allows signal32 to not have its own declaration. This patch also removes all ICACHE_REFILLS_WORKAROUND_WAR tests in structure declaration and hopefully make them more readable. Signed-off-by: Franck Bui-Huu Signed-off-by: Ralf Baechle --- arch/mips/kernel/signal32.c | 49 +++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'arch/mips/kernel/signal32.c') diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index c86a5ddff05..e0a85533182 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -139,6 +139,27 @@ struct ucontext32 { sigset_t32 uc_sigmask; /* mask last for extensibility */ }; +#if ICACHE_REFILLS_WORKAROUND_WAR == 0 + +struct rt_sigframe32 { + u32 rs_ass[4]; /* argument save space for o32 */ + u32 rs_code[2]; /* signal trampoline */ + compat_siginfo_t rs_info; + struct ucontext32 rs_uc; +}; + +#else /* ICACHE_REFILLS_WORKAROUND_WAR */ + +struct rt_sigframe32 { + u32 rs_ass[4]; /* argument save space for o32 */ + u32 rs_pad[2]; + compat_siginfo_t rs_info; + struct ucontext32 rs_uc; + u32 rs_code[8] __attribute__((aligned(32))); /* signal trampoline */ +}; + +#endif /* !ICACHE_REFILLS_WORKAROUND_WAR */ + extern void __put_sigset_unknown_nsig(void); extern void __get_sigset_unknown_nsig(void); @@ -383,34 +404,6 @@ static int restore_sigcontext32(struct pt_regs *regs, struct sigcontext32 __user return err; } -struct sigframe { - u32 sf_ass[4]; /* argument save space for o32 */ -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 sf_pad[2]; -#else - u32 sf_code[2]; /* signal trampoline */ -#endif - struct sigcontext32 sf_sc; - sigset_t sf_mask; -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */ -#endif -}; - -struct rt_sigframe32 { - u32 rs_ass[4]; /* argument save space for o32 */ -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 rs_pad[2]; -#else - u32 rs_code[2]; /* signal trampoline */ -#endif - compat_siginfo_t rs_info; - struct ucontext32 rs_uc; -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 rs_code[8] __attribute__((aligned(32))); /* signal trampoline */ -#endif -}; - int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) { int err; -- cgit v1.2.3