]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/signal.c
Merge branch 'linus' into perfcounters/core-v2
[karo-tx-linux.git] / arch / x86 / kernel / signal.c
index dfcc74ab0ab64f922c12717ada6a248408593a75..611615a92c9029ad882638f6619f45f0d8e6348c 100644 (file)
@@ -6,7 +6,7 @@
  *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
  *  2000-2002   x86-64 support by Andi Kleen
  */
-
+#include <linux/perf_counter.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
@@ -221,7 +221,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
        if (!onsigstack) {
                /* This is the X/Open sanctioned signal stack switching.  */
                if (ka->sa.sa_flags & SA_ONSTACK) {
-                       if (sas_ss_flags(sp) == 0)
+                       if (current->sas_ss_size)
                                sp = current->sas_ss_sp + current->sas_ss_size;
                } else {
 #ifdef CONFIG_X86_32
@@ -872,6 +872,11 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
                tracehook_notify_resume(regs);
        }
 
+       if (thread_info_flags & _TIF_PERF_COUNTERS) {
+               clear_thread_flag(TIF_PERF_COUNTERS);
+               perf_counter_notify(regs);
+       }
+
 #ifdef CONFIG_X86_32
        clear_thread_flag(TIF_IRET);
 #endif /* CONFIG_X86_32 */