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/signal.c | 56 ++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'arch/mips/kernel/signal.c') diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 7d5a631d6ca..4a707186306 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -38,6 +38,27 @@ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) +#if ICACHE_REFILLS_WORKAROUND_WAR == 0 + +struct rt_sigframe { + u32 rs_ass[4]; /* argument save space for o32 */ + u32 rs_code[2]; /* signal trampoline */ + struct siginfo rs_info; + struct ucontext rs_uc; +}; + +#else + +struct rt_sigframe { + u32 rs_ass[4]; /* argument save space for o32 */ + u32 rs_pad[2]; + struct siginfo rs_info; + struct ucontext rs_uc; + u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ +}; + +#endif + /* * Helper routines */ @@ -287,41 +308,6 @@ asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs regs) return do_sigaltstack(uss, uoss, usp); } -/* - * Horribly complicated - with the bloody RM9000 workarounds enabled - * the signal trampolines is moving to the end of the structure so we can - * increase the alignment without breaking software compatibility. - */ -#ifdef CONFIG_TRAD_SIGNALS -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 sigcontext sf_sc; - sigset_t sf_mask; -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */ -#endif -}; -#endif - -struct rt_sigframe { - 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 - struct siginfo rs_info; - struct ucontext rs_uc; -#if ICACHE_REFILLS_WORKAROUND_WAR - u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ -#endif -}; - #ifdef CONFIG_TRAD_SIGNALS save_static_function(sys_sigreturn); __attribute_used__ noinline static void -- cgit v1.2.3