diff options
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/Kconfig | 2 | ||||
-rw-r--r-- | arch/frv/include/asm/signal.h | 7 | ||||
-rw-r--r-- | arch/frv/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/frv/kernel/signal.c | 55 |
4 files changed, 4 insertions, 62 deletions
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 17df48fc8f44..2d0509d4cfee 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -11,6 +11,8 @@ config FRV select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_CPU_DEVICES select ARCH_WANT_IPC_PARSE_VERSION + select OLD_SIGSUSPEND3 + select OLD_SIGACTION config ZONE_DMA bool diff --git a/arch/frv/include/asm/signal.h b/arch/frv/include/asm/signal.h index 599500a31025..eca0abcb79d6 100644 --- a/arch/frv/include/asm/signal.h +++ b/arch/frv/include/asm/signal.h @@ -3,11 +3,4 @@ #include <uapi/asm/signal.h> -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - __sigrestore_t sa_restorer; -}; - #endif /* _ASM_SIGNAL_H */ diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index d685da17f5fb..4cfcc7bba25a 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h @@ -27,8 +27,6 @@ #define __ARCH_WANT_SYS_OLDUMOUNT /* #define __ARCH_WANT_SYS_SIGPENDING */ #define __ARCH_WANT_SYS_SIGPROCMASK -#define __ARCH_WANT_SYS_RT_SIGACTION -#define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_FORK #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_CLONE diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 535810a3217a..d822700d4f15 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c @@ -33,55 +33,6 @@ struct fdpic_func_descriptor { }; /* - * Atomically swap in the new signal mask, and wait for a signal. - */ -asmlinkage int sys_sigsuspend(int history0, int history1, old_sigset_t mask) -{ - sigset_t blocked; - siginitset(&blocked, mask); - return sigsuspend(&blocked); -} - -asmlinkage int sys_sigaction(int sig, - const struct old_sigaction __user *act, - struct old_sigaction __user *oact) -{ - struct k_sigaction new_ka, old_ka; - int ret; - - if (act) { - old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || - __get_user(new_ka.sa.sa_handler, &act->sa_handler) || - __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || - __get_user(new_ka.sa.sa_flags, &act->sa_flags) || - __get_user(mask, &act->sa_mask)) - return -EFAULT; - siginitset(&new_ka.sa.sa_mask, mask); - } - - ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); - - if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || - __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || - __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || - __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || - __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) - return -EFAULT; - } - - return ret; -} - -asmlinkage -int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) -{ - return do_sigaltstack(uss, uoss, __frame->sp); -} - - -/* * Do a signal return; undo the signal stack. */ @@ -173,7 +124,7 @@ asmlinkage int sys_rt_sigreturn(void) if (restore_sigcontext(&frame->uc.uc_mcontext, &gr8)) goto badframe; - if (do_sigaltstack(&frame->uc.uc_stack, NULL, __frame->sp) == -EFAULT) + if (restore_altstack(&frame->uc.uc_stack)) goto badframe; return gr8; @@ -345,9 +296,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* Create the ucontext. */ if (__put_user(0, &frame->uc.uc_flags) || __put_user(NULL, &frame->uc.uc_link) || - __put_user((void __user *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) || - __put_user(sas_ss_flags(__frame->sp), &frame->uc.uc_stack.ss_flags) || - __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size)) + __save_altstack(&frame->uc.uc_stack, __frame->sp)) goto give_sigsegv; if (setup_sigcontext(&frame->uc.uc_mcontext, set->sig[0])) |