12 #include <linux/sched.h>
15 #include <linux/kernel.h>
16 #include <linux/signal.h>
17 #include <linux/errno.h>
18 #include <linux/wait.h>
19 #include <linux/ptrace.h>
21 #include <linux/stddef.h>
22 #include <linux/tty.h>
23 #include <linux/personality.h>
26 #include <asm/cacheflush.h>
27 #include <asm/ucontext.h>
28 #include <asm/uaccess.h>
40 siginitset(&blocked, mask);
62 siginitset(&new_ka.
sa.sa_mask, mask);
101 #define COPY(x) err |= __get_user(regs->x, &sc->x)
113 unsigned int tmpflags;
114 #ifndef CONFIG_MN10300_USING_JTAG
115 #define USER_EPSW (EPSW_FLAG_Z | EPSW_FLAG_N | EPSW_FLAG_C | EPSW_FLAG_V | \
118 #define USER_EPSW (EPSW_FLAG_Z | EPSW_FLAG_N | EPSW_FLAG_C | EPSW_FLAG_V | \
123 (tmpflags & USER_EPSW);
153 frame = (
struct sigframe __user *) current_frame()->sp;
154 if (verify_area(
VERIFY_READ, frame,
sizeof(*frame)))
185 frame = (
struct rt_sigframe __user *) current_frame()->sp;
186 if (verify_area(
VERIFY_READ, frame,
sizeof(*frame)))
217 #define COPY(x) err |= __put_user(regs->x, &sc->x)
254 if (sas_ss_flags(sp) == 0)
258 return (
void __user *) ((sp - frame_size) & ~7
UL);
311 (
unsigned long) frame->
retcode + 5);
315 regs->
sp = (
unsigned long) frame;
316 regs->
pc = (
unsigned long) ka->
sa.sa_handler;
318 regs->
d1 = (
unsigned long) &frame->
sc;
363 __put_user(sas_ss_flags(regs->
sp), &frame->
uc.uc_stack.ss_flags) ||
381 (
char *)(frame->
retcode + 1)) ||
392 regs->
sp = (
unsigned long) frame;
393 regs->
pc = (
unsigned long) ka->
sa.sa_handler;
395 regs->
d1 = (
long) &frame->
info;
410 static inline void stepback(
struct pt_regs *regs)
419 static int handle_signal(
int sig,
423 sigset_t *oldset = sigmask_to_save();
450 ret = setup_rt_frame(sig, ka, info, oldset, regs);
452 ret = setup_frame(sig, ka, oldset, regs);
472 if (handle_signal(signr, &info, &ka, regs) == 0) {
498 restore_saved_sigmask();
509 #ifndef CONFIG_MN10300_USING_JTAG
510 regs->
epsw |= EPSW_T;
523 tracehook_notify_resume(current_frame());