[MIPS] signal: do not inline handle_signal()
[sfrench/cifs-2.6.git] / arch / mips / kernel / signal.c
index 4a70718630655fa333a81540da0b781e4a223fd3..54398af2371f9b33d834cfc70b9916fc4337d0d6 100644 (file)
@@ -34,8 +34,6 @@
 
 #include "signal-common.h"
 
-#define DEBUG_SIG 0
-
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 #if ICACHE_REFILLS_WORKAROUND_WAR == 0
@@ -184,7 +182,7 @@ int install_sigtramp(unsigned int __user *tramp, unsigned int syscall)
         */
 
        err = __put_user(0x24020000 + syscall, tramp + 0);
-       err |= __put_user(0x0000000c          , tramp + 1);
+       err |= __put_user(0x0000000c         , tramp + 1);
        if (ICACHE_REFILLS_WORKAROUND_WAR) {
                err |= __put_user(0, tramp + 2);
                err |= __put_user(0, tramp + 3);
@@ -203,9 +201,7 @@ int install_sigtramp(unsigned int __user *tramp, unsigned int syscall)
  */
 
 #ifdef CONFIG_TRAD_SIGNALS
-save_static_function(sys_sigsuspend);
-__attribute_used__ noinline static int
-_sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
+asmlinkage int sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
 {
        sigset_t newset;
        sigset_t __user *uset;
@@ -228,9 +224,7 @@ _sys_sigsuspend(nabi_no_regargs struct pt_regs regs)
 }
 #endif
 
-save_static_function(sys_rt_sigsuspend);
-__attribute_used__ noinline static int
-_sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
+asmlinkage int sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
 {
        sigset_t newset;
        sigset_t __user *unewset;
@@ -309,9 +303,7 @@ asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs regs)
 }
 
 #ifdef CONFIG_TRAD_SIGNALS
-save_static_function(sys_sigreturn);
-__attribute_used__ noinline static void
-_sys_sigreturn(nabi_no_regargs struct pt_regs regs)
+asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
 {
        struct sigframe __user *frame;
        sigset_t blocked;
@@ -346,9 +338,7 @@ badframe:
 }
 #endif /* CONFIG_TRAD_SIGNALS */
 
-save_static_function(sys_rt_sigreturn);
-__attribute_used__ noinline static void
-_sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
+asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
 {
        struct rt_sigframe __user *frame;
        sigset_t set;
@@ -400,7 +390,7 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
        if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
                goto give_sigsegv;
 
-       install_sigtramp(frame->sf_code, __NR_sigreturn);
+       err |= install_sigtramp(frame->sf_code, __NR_sigreturn);
 
        err |= setup_sigcontext(regs, &frame->sf_sc);
        err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set));
@@ -424,11 +414,9 @@ int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
        regs->regs[31] = (unsigned long) frame->sf_code;
        regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
 
-#if DEBUG_SIG
-       printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
+       DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
               current->comm, current->pid,
-              frame, regs->cp0_epc, frame->regs[31]);
-#endif
+              frame, regs->cp0_epc, regs->regs[31]);
        return 0;
 
 give_sigsegv:
@@ -447,7 +435,7 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
        if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
                goto give_sigsegv;
 
-       install_sigtramp(frame->rs_code, __NR_rt_sigreturn);
+       err |= install_sigtramp(frame->rs_code, __NR_rt_sigreturn);
 
        /* Create siginfo.  */
        err |= copy_siginfo_to_user(&frame->rs_info, info);
@@ -484,11 +472,10 @@ int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
        regs->regs[31] = (unsigned long) frame->rs_code;
        regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
 
-#if DEBUG_SIG
-       printk("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%p\n",
+       DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
               current->comm, current->pid,
               frame, regs->cp0_epc, regs->regs[31]);
-#endif
+
        return 0;
 
 give_sigsegv:
@@ -496,7 +483,7 @@ give_sigsegv:
        return -EFAULT;
 }
 
-static inline int handle_signal(unsigned long sig, siginfo_t *info,
+static int handle_signal(unsigned long sig, siginfo_t *info,
        struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
 {
        int ret;