diff options
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 2e902359aee5..6bfb2faa0b19 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -803,12 +803,16 @@ static inline void perf_event_task_tick(void) { } | |||
803 | do { \ | 803 | do { \ |
804 | static struct notifier_block fn##_nb __cpuinitdata = \ | 804 | static struct notifier_block fn##_nb __cpuinitdata = \ |
805 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ | 805 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ |
806 | unsigned long cpu = smp_processor_id(); \ | ||
807 | unsigned long flags; \ | ||
806 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | 808 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ |
807 | (void *)(unsigned long)smp_processor_id()); \ | 809 | (void *)(unsigned long)cpu); \ |
810 | local_irq_save(flags); \ | ||
808 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | 811 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ |
809 | (void *)(unsigned long)smp_processor_id()); \ | 812 | (void *)(unsigned long)cpu); \ |
813 | local_irq_restore(flags); \ | ||
810 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | 814 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ |
811 | (void *)(unsigned long)smp_processor_id()); \ | 815 | (void *)(unsigned long)cpu); \ |
812 | register_cpu_notifier(&fn##_nb); \ | 816 | register_cpu_notifier(&fn##_nb); \ |
813 | } while (0) | 817 | } while (0) |
814 | 818 | ||