diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:37:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 11:37:29 -0400 |
commit | e270b51df657011983241ec61a1fc7de186e16cd (patch) | |
tree | 3397be4cbf31676ca6ebb187903e8cfc2218f223 /arch/sparc64/kernel/signal.c | |
parent | 8fa82790fb9dfe57aeafc8de6b6a5c1df63efa06 (diff) | |
parent | 227739bf4c110bbd02d0c0f13b272c32de406e4c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (23 commits)
sparc: sunzilog uart order
[SPARC64]: Detect trap frames in stack backtraces.
[SPARC64]: %l6 trap return handling no longer necessary.
[SPARC64]: Use trap type stored in pt_regs to handle syscall restart.
[SPARC64]: Store magic cookie and trap type in pt_regs.
[SPARC64]: PROM debug console can be CON_ANYTIME.
sparc64: cleanup after SunOS/Solaris binary emulation removal
sparc: cleanup after SunOS binary emulation removal
[SPARC64]: Add NUMA support.
[SPARC64]: Allocate TSB node-local.
[SPARC64]: NUMA device infrastructure.
[SPARC64]: Kill pci_iommu_table_init() declaration.
[SPARC64]: Once we have the boot cmdline, call parse_early_param()
[SPARC64]: Remove unused asm-sparc64/numnodes.h
[SPARC64]: Decrease SECTION_SIZE_BITS to 30.
[SPARC64]: Initialize MDESC earlier and use lmb_alloc()
[SPARC64]: Use lmb_alloc() for PROM device tree.
[SPARC64]: Call real_setup_per_cpu_areas() earlier and use lmb_alloc().
[SPARC64]: Fully use LMB information in bootmem_init().
[SPARC64]: Start using LMB information in bootmem_init().
...
Diffstat (limited to 'arch/sparc64/kernel/signal.c')
-rw-r--r-- | arch/sparc64/kernel/signal.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 1c47009eb5ec..77a3e8592cbc 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c | |||
@@ -510,15 +510,20 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, | |||
510 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 510 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
511 | * mistake. | 511 | * mistake. |
512 | */ | 512 | */ |
513 | static void do_signal(struct pt_regs *regs, unsigned long orig_i0, int restart_syscall) | 513 | static void do_signal(struct pt_regs *regs, unsigned long orig_i0) |
514 | { | 514 | { |
515 | siginfo_t info; | ||
516 | struct signal_deliver_cookie cookie; | 515 | struct signal_deliver_cookie cookie; |
517 | struct k_sigaction ka; | 516 | struct k_sigaction ka; |
518 | int signr; | ||
519 | sigset_t *oldset; | 517 | sigset_t *oldset; |
518 | siginfo_t info; | ||
519 | int signr, tt; | ||
520 | 520 | ||
521 | cookie.restart_syscall = restart_syscall; | 521 | tt = regs->magic & 0x1ff; |
522 | if (tt == 0x110 || tt == 0x111 || tt == 0x16d) { | ||
523 | regs->magic &= ~0x1ff; | ||
524 | cookie.restart_syscall = 1; | ||
525 | } else | ||
526 | cookie.restart_syscall = 0; | ||
522 | cookie.orig_i0 = orig_i0; | 527 | cookie.orig_i0 = orig_i0; |
523 | 528 | ||
524 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 529 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
@@ -529,9 +534,8 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0, int restart_s | |||
529 | #ifdef CONFIG_SPARC32_COMPAT | 534 | #ifdef CONFIG_SPARC32_COMPAT |
530 | if (test_thread_flag(TIF_32BIT)) { | 535 | if (test_thread_flag(TIF_32BIT)) { |
531 | extern void do_signal32(sigset_t *, struct pt_regs *, | 536 | extern void do_signal32(sigset_t *, struct pt_regs *, |
532 | unsigned long, int); | 537 | struct signal_deliver_cookie *); |
533 | do_signal32(oldset, regs, orig_i0, | 538 | do_signal32(oldset, regs, &cookie); |
534 | cookie.restart_syscall); | ||
535 | return; | 539 | return; |
536 | } | 540 | } |
537 | #endif | 541 | #endif |
@@ -539,7 +543,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0, int restart_s | |||
539 | signr = get_signal_to_deliver(&info, &ka, regs, &cookie); | 543 | signr = get_signal_to_deliver(&info, &ka, regs, &cookie); |
540 | if (signr > 0) { | 544 | if (signr > 0) { |
541 | if (cookie.restart_syscall) | 545 | if (cookie.restart_syscall) |
542 | syscall_restart(orig_i0, regs, &ka.sa); | 546 | syscall_restart(cookie.orig_i0, regs, &ka.sa); |
543 | handle_signal(signr, &ka, &info, oldset, regs); | 547 | handle_signal(signr, &ka, &info, oldset, regs); |
544 | 548 | ||
545 | /* a signal was successfully delivered; the saved | 549 | /* a signal was successfully delivered; the saved |
@@ -576,11 +580,10 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0, int restart_s | |||
576 | } | 580 | } |
577 | } | 581 | } |
578 | 582 | ||
579 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, int restart_syscall, | 583 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags) |
580 | unsigned long thread_info_flags) | ||
581 | { | 584 | { |
582 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 585 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
583 | do_signal(regs, orig_i0, restart_syscall); | 586 | do_signal(regs, orig_i0); |
584 | } | 587 | } |
585 | 588 | ||
586 | void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) | 589 | void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) |