aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/m68knommu/kernel/signal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
index 43a2726c0d0a..e1b3aa39e270 100644
--- a/arch/m68knommu/kernel/signal.c
+++ b/arch/m68knommu/kernel/signal.c
@@ -285,6 +285,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, void *fp,
285 regs->d1 = context.sc_d1; 285 regs->d1 = context.sc_d1;
286 regs->a0 = context.sc_a0; 286 regs->a0 = context.sc_a0;
287 regs->a1 = context.sc_a1; 287 regs->a1 = context.sc_a1;
288 ((struct switch_stack *)regs - 1)->a5 = context.sc_a5;
288 regs->sr = (regs->sr & 0xff00) | (context.sc_sr & 0xff); 289 regs->sr = (regs->sr & 0xff00) | (context.sc_sr & 0xff);
289 regs->pc = context.sc_pc; 290 regs->pc = context.sc_pc;
290 regs->orig_d0 = -1; /* disable syscall checks */ 291 regs->orig_d0 = -1; /* disable syscall checks */
@@ -498,6 +499,7 @@ static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
498 sc->sc_d1 = regs->d1; 499 sc->sc_d1 = regs->d1;
499 sc->sc_a0 = regs->a0; 500 sc->sc_a0 = regs->a0;
500 sc->sc_a1 = regs->a1; 501 sc->sc_a1 = regs->a1;
502 sc->sc_a5 = ((struct switch_stack *)regs - 1)->a5;
501 sc->sc_sr = regs->sr; 503 sc->sc_sr = regs->sr;
502 sc->sc_pc = regs->pc; 504 sc->sc_pc = regs->pc;
503 sc->sc_formatvec = regs->format << 12 | regs->vector; 505 sc->sc_formatvec = regs->format << 12 | regs->vector;
@@ -597,6 +599,9 @@ static void setup_frame (int sig, struct k_sigaction *ka,
597 /* Set up registers for signal handler */ 599 /* Set up registers for signal handler */
598 wrusp ((unsigned long) frame); 600 wrusp ((unsigned long) frame);
599 regs->pc = (unsigned long) ka->sa.sa_handler; 601 regs->pc = (unsigned long) ka->sa.sa_handler;
602 ((struct switch_stack *)regs - 1)->a5 = current->mm->start_data;
603 regs->format = 0x4; /*set format byte to make stack appear modulo 4
604 which it will be when doing the rte */
600 605
601adjust_stack: 606adjust_stack:
602 /* Prepare to skip over the extra stuff in the exception frame. */ 607 /* Prepare to skip over the extra stuff in the exception frame. */
@@ -664,6 +669,9 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
664 /* Set up registers for signal handler */ 669 /* Set up registers for signal handler */
665 wrusp ((unsigned long) frame); 670 wrusp ((unsigned long) frame);
666 regs->pc = (unsigned long) ka->sa.sa_handler; 671 regs->pc = (unsigned long) ka->sa.sa_handler;
672 ((struct switch_stack *)regs - 1)->a5 = current->mm->start_data;
673 regs->format = 0x4; /*set format byte to make stack appear modulo 4
674 which it will be when doing the rte */
667 675
668adjust_stack: 676adjust_stack:
669 /* Prepare to skip over the extra stuff in the exception frame. */ 677 /* Prepare to skip over the extra stuff in the exception frame. */