diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/hvtramp.S | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/signal.c | 15 |
2 files changed, 5 insertions, 13 deletions
diff --git a/arch/sparc64/kernel/hvtramp.S b/arch/sparc64/kernel/hvtramp.S index 76a090e2c2a8..a55c252e18cc 100644 --- a/arch/sparc64/kernel/hvtramp.S +++ b/arch/sparc64/kernel/hvtramp.S | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/hvtramp.h> | 10 | #include <asm/hvtramp.h> |
11 | #include <asm/pstate.h> | 11 | #include <asm/pstate.h> |
12 | #include <asm/ptrace.h> | 12 | #include <asm/ptrace.h> |
13 | #include <asm/head.h> | ||
13 | #include <asm/asi.h> | 14 | #include <asm/asi.h> |
14 | 15 | ||
15 | .text | 16 | .text |
@@ -28,7 +29,7 @@ | |||
28 | * First setup basic privileged cpu state. | 29 | * First setup basic privileged cpu state. |
29 | */ | 30 | */ |
30 | hv_cpu_startup: | 31 | hv_cpu_startup: |
31 | wrpr %g0, 0, %gl | 32 | SET_GL(0) |
32 | wrpr %g0, 15, %pil | 33 | wrpr %g0, 15, %pil |
33 | wrpr %g0, 0, %canrestore | 34 | wrpr %g0, 0, %canrestore |
34 | wrpr %g0, 0, %otherwin | 35 | wrpr %g0, 0, %otherwin |
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 203e87301005..fb13775b3682 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c | |||
@@ -289,9 +289,7 @@ void do_rt_sigreturn(struct pt_regs *regs) | |||
289 | struct rt_signal_frame __user *sf; | 289 | struct rt_signal_frame __user *sf; |
290 | unsigned long tpc, tnpc, tstate; | 290 | unsigned long tpc, tnpc, tstate; |
291 | __siginfo_fpu_t __user *fpu_save; | 291 | __siginfo_fpu_t __user *fpu_save; |
292 | mm_segment_t old_fs; | ||
293 | sigset_t set; | 292 | sigset_t set; |
294 | stack_t st; | ||
295 | int err; | 293 | int err; |
296 | 294 | ||
297 | /* Always make any pending restarted system calls return -EINTR */ | 295 | /* Always make any pending restarted system calls return -EINTR */ |
@@ -327,20 +325,13 @@ void do_rt_sigreturn(struct pt_regs *regs) | |||
327 | err |= restore_fpu_state(regs, &sf->fpu_state); | 325 | err |= restore_fpu_state(regs, &sf->fpu_state); |
328 | 326 | ||
329 | err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); | 327 | err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); |
330 | err |= __copy_from_user(&st, &sf->stack, sizeof(stack_t)); | 328 | err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf); |
331 | 329 | ||
332 | if (err) | 330 | if (err) |
333 | goto segv; | 331 | goto segv; |
334 | 332 | ||
335 | regs->tpc = tpc; | 333 | regs->tpc = tpc; |
336 | regs->tnpc = tnpc; | 334 | regs->tnpc = tnpc; |
337 | |||
338 | /* It is more difficult to avoid calling this function than to | ||
339 | call it and ignore errors. */ | ||
340 | old_fs = get_fs(); | ||
341 | set_fs(KERNEL_DS); | ||
342 | do_sigaltstack((const stack_t __user *) &st, NULL, (unsigned long)sf); | ||
343 | set_fs(old_fs); | ||
344 | 335 | ||
345 | sigdelsetmask(&set, ~_BLOCKABLE); | 336 | sigdelsetmask(&set, ~_BLOCKABLE); |
346 | spin_lock_irq(¤t->sighand->siglock); | 337 | spin_lock_irq(¤t->sighand->siglock); |