diff options
| author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-09-23 20:21:45 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-24 03:35:54 -0400 |
| commit | ee847c54ba7fc09f85f13a5bf18f45ea6c19aa83 (patch) | |
| tree | 4a7b2f98df43c2f1a026ecfe57a97ab452176dc3 | |
| parent | 5fd933303bd1efacbd0acbe452ba9b889440eb40 (diff) | |
x86: signal: cosmetic unification of do_notify_resume()
Make do_notify_resume() same.
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | arch/x86/kernel/signal_32.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/signal_64.c | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index da3cf3270f83..b94463f264b4 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
| @@ -663,6 +663,12 @@ static void do_signal(struct pt_regs *regs) | |||
| 663 | void | 663 | void |
| 664 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | 664 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) |
| 665 | { | 665 | { |
| 666 | #if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE) | ||
| 667 | /* notify userspace of pending MCEs */ | ||
| 668 | if (thread_info_flags & _TIF_MCE_NOTIFY) | ||
| 669 | mce_notify_user(); | ||
| 670 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ | ||
| 671 | |||
| 666 | /* deal with pending signal delivery */ | 672 | /* deal with pending signal delivery */ |
| 667 | if (thread_info_flags & _TIF_SIGPENDING) | 673 | if (thread_info_flags & _TIF_SIGPENDING) |
| 668 | do_signal(regs); | 674 | do_signal(regs); |
| @@ -672,7 +678,9 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
| 672 | tracehook_notify_resume(regs); | 678 | tracehook_notify_resume(regs); |
| 673 | } | 679 | } |
| 674 | 680 | ||
| 681 | #ifdef CONFIG_X86_32 | ||
| 675 | clear_thread_flag(TIF_IRET); | 682 | clear_thread_flag(TIF_IRET); |
| 683 | #endif /* CONFIG_X86_32 */ | ||
| 676 | } | 684 | } |
| 677 | 685 | ||
| 678 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) | 686 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 5a5fbc3b1eea..9087752f4109 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
| @@ -460,14 +460,18 @@ static void do_signal(struct pt_regs *regs) | |||
| 460 | } | 460 | } |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | void do_notify_resume(struct pt_regs *regs, void *unused, | 463 | /* |
| 464 | __u32 thread_info_flags) | 464 | * notification of userspace execution resumption |
| 465 | * - triggered by the TIF_WORK_MASK flags | ||
| 466 | */ | ||
| 467 | void | ||
| 468 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | ||
| 465 | { | 469 | { |
| 466 | #ifdef CONFIG_X86_MCE | 470 | #if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE) |
| 467 | /* notify userspace of pending MCEs */ | 471 | /* notify userspace of pending MCEs */ |
| 468 | if (thread_info_flags & _TIF_MCE_NOTIFY) | 472 | if (thread_info_flags & _TIF_MCE_NOTIFY) |
| 469 | mce_notify_user(); | 473 | mce_notify_user(); |
| 470 | #endif /* CONFIG_X86_MCE */ | 474 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ |
| 471 | 475 | ||
| 472 | /* deal with pending signal delivery */ | 476 | /* deal with pending signal delivery */ |
| 473 | if (thread_info_flags & _TIF_SIGPENDING) | 477 | if (thread_info_flags & _TIF_SIGPENDING) |
| @@ -477,6 +481,10 @@ void do_notify_resume(struct pt_regs *regs, void *unused, | |||
| 477 | clear_thread_flag(TIF_NOTIFY_RESUME); | 481 | clear_thread_flag(TIF_NOTIFY_RESUME); |
| 478 | tracehook_notify_resume(regs); | 482 | tracehook_notify_resume(regs); |
| 479 | } | 483 | } |
| 484 | |||
| 485 | #ifdef CONFIG_X86_32 | ||
| 486 | clear_thread_flag(TIF_IRET); | ||
| 487 | #endif /* CONFIG_X86_32 */ | ||
| 480 | } | 488 | } |
| 481 | 489 | ||
| 482 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) | 490 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where) |
