diff options
| author | Catalin Marinas <catalin.marinas@arm.com> | 2012-11-05 14:58:32 +0000 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-11-05 14:58:32 +0000 |
| commit | 3fd9396af83a1e69eaf9ebb573207431d8f265b6 (patch) | |
| tree | f221f5777695de71ea97423c67438bca1746e26c /include/linux/perf_event.h | |
| parent | e3978cded41dc7b364e74037f56d6bc558c11fd7 (diff) | |
| parent | 3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff) | |
Merge tag 'v3.7-rc4' into upstream-master
Linux 3.7-rc4
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) { } do { \ static struct notifier_block fn##_nb __cpuinitdata = \ { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ + unsigned long cpu = smp_processor_id(); \ + unsigned long flags; \ fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ - (void *)(unsigned long)smp_processor_id()); \ + (void *)(unsigned long)cpu); \ + local_irq_save(flags); \ fn(&fn##_nb, (unsigned long)CPU_STARTING, \ - (void *)(unsigned long)smp_processor_id()); \ + (void *)(unsigned long)cpu); \ + local_irq_restore(flags); \ fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ - (void *)(unsigned long)smp_processor_id()); \ + (void *)(unsigned long)cpu); \ register_cpu_notifier(&fn##_nb); \ } while (0) |
