diff options
Diffstat (limited to 'arch/h8300')
-rw-r--r-- | arch/h8300/Kconfig | 2 | ||||
-rw-r--r-- | arch/h8300/README | 2 | ||||
-rw-r--r-- | arch/h8300/include/asm/signal.h | 18 | ||||
-rw-r--r-- | arch/h8300/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/h8300/include/uapi/asm/socket.h | 4 | ||||
-rw-r--r-- | arch/h8300/kernel/signal.c | 72 | ||||
-rw-r--r-- | arch/h8300/kernel/syscalls.S | 15 |
7 files changed, 15 insertions, 100 deletions
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 2d2efb653ee0..05b613af223a 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -9,6 +9,8 @@ config H8300 select GENERIC_IRQ_SHOW select GENERIC_CPU_DEVICES select MODULES_USE_ELF_RELA + select OLD_SIGSUSPEND3 + select OLD_SIGACTION config SYMBOL_PREFIX string diff --git a/arch/h8300/README b/arch/h8300/README index 637f5a02f311..efa805fda19b 100644 --- a/arch/h8300/README +++ b/arch/h8300/README @@ -11,7 +11,7 @@ H8/300H and H8S 2.AE 3068/AE 3069 more information MICROTRONIQUE <http://www.microtronique.com/> - Akizuki Denshi Tsusho Ltd. <http://www.akizuki.ne.jp> (Japanese Only) + Akizuki Denshi Tsusho Ltd. <http://akizukidenshi.com/> (Japanese Only) 3.H8MAX see http://ip-sol.jp/h8max/ (Japanese Only) diff --git a/arch/h8300/include/asm/signal.h b/arch/h8300/include/asm/signal.h index 66c81c67e55d..6341e36386f8 100644 --- a/arch/h8300/include/asm/signal.h +++ b/arch/h8300/include/asm/signal.h @@ -16,23 +16,7 @@ typedef struct { unsigned long sig[_NSIG_WORDS]; } sigset_t; -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; - void (*sa_restorer)(void); - sigset_t sa_mask; /* mask last for extensibility */ -}; - -struct k_sigaction { - struct sigaction sa; -}; +#define __ARCH_HAS_SA_RESTORER #include <asm/sigcontext.h> #undef __HAVE_ARCH_SIG_BITOPS diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h index aa38105959fb..6721856d841b 100644 --- a/arch/h8300/include/asm/unistd.h +++ b/arch/h8300/include/asm/unistd.h @@ -29,8 +29,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/h8300/include/uapi/asm/socket.h b/arch/h8300/include/uapi/asm/socket.h index 90a2e573c7e6..43e32621da7d 100644 --- a/arch/h8300/include/uapi/asm/socket.h +++ b/arch/h8300/include/uapi/asm/socket.h @@ -22,7 +22,7 @@ #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ +#define SO_REUSEPORT 15 #define SO_PASSCRED 16 #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 @@ -70,4 +70,6 @@ /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 +#define SO_LOCK_FILTER 44 + #endif /* _ASM_SOCKET_H */ diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index 0e81b96c642f..a65ff3b76326 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c @@ -47,56 +47,6 @@ #include <asm/ucontext.h> /* - * Atomically swap in the new signal mask, and wait for a signal. - */ -asmlinkage int -sys_sigsuspend(int unused1, int unused2, old_sigset_t mask) -{ - sigset_t blocked; - siginitset(&blocked, mask); - return sigsuspend(&blocked); -} - -asmlinkage int -sys_sigaction(int sig, const struct old_sigaction *act, - struct old_sigaction *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 *uss, stack_t *uoss) -{ - return do_sigaltstack(uss, uoss, rdusp()); -} - - -/* * Do a signal return; undo the signal stack. * * Keep the return code on the stack quadword aligned! @@ -136,9 +86,9 @@ struct rt_sigframe } __attribute__((aligned(2),packed)); static inline int -restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, - int *pd0) +restore_sigcontext(struct sigcontext *usc, int *pd0) { + struct pt_regs *regs = current_pt_regs(); int err = 0; unsigned int ccr; unsigned int usp; @@ -167,9 +117,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, return err; } -asmlinkage int do_sigreturn(unsigned long __unused,...) +asmlinkage int sys_sigreturn(void) { - struct pt_regs *regs = (struct pt_regs *) (&__unused - 1); unsigned long usp = rdusp(); struct sigframe *frame = (struct sigframe *)(usp - 4); sigset_t set; @@ -185,7 +134,7 @@ asmlinkage int do_sigreturn(unsigned long __unused,...) set_current_blocked(&set); - if (restore_sigcontext(regs, &frame->sc, &er0)) + if (restore_sigcontext(&frame->sc, &er0)) goto badframe; return er0; @@ -194,9 +143,8 @@ badframe: return 0; } -asmlinkage int do_rt_sigreturn(unsigned long __unused,...) +asmlinkage int sys_rt_sigreturn(void) { - struct pt_regs *regs = (struct pt_regs *) &__unused; unsigned long usp = rdusp(); struct rt_sigframe *frame = (struct rt_sigframe *)(usp - 4); sigset_t set; @@ -209,10 +157,10 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused,...) set_current_blocked(&set); - if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &er0)) + if (restore_sigcontext(&frame->uc.uc_mcontext, &er0)) goto badframe; - if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT) + if (restore_altstack(&frame->uc.uc_stack)) goto badframe; return er0; @@ -358,11 +306,7 @@ static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, /* Create the ucontext. */ err |= __put_user(0, &frame->uc.uc_flags); err |= __put_user(0, &frame->uc.uc_link); - err |= __put_user((void *)current->sas_ss_sp, - &frame->uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(rdusp()), - &frame->uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); + err |= __save_altstack(&frame->uc.uc_stack, rdusp()); err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]); err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); if (err) diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S index b74dd0ade58d..5c2168fb9b9e 100644 --- a/arch/h8300/kernel/syscalls.S +++ b/arch/h8300/kernel/syscalls.S @@ -334,18 +334,3 @@ SYMBOL_NAME_LABEL(sys_call_table) .long SYMBOL_NAME(sys_getcpu) .long SYMBOL_NAME(sys_ni_syscall) /* sys_epoll_pwait */ .long SYMBOL_NAME(sys_setns) /* 320 */ - - .macro call_sp addr - mov.l #SYMBOL_NAME(\addr),er6 - bra SYMBOL_NAME(syscall_trampoline):8 - .endm - -SYMBOL_NAME_LABEL(sys_sigreturn) - call_sp do_sigreturn - -SYMBOL_NAME_LABEL(sys_rt_sigreturn) - call_sp do_rt_sigreturn - -SYMBOL_NAME_LABEL(syscall_trampoline) - mov.l sp,er0 - jmp @er6 |