[patch V2 27/67] perf/core: Remove perf CPU notifier code

From: Anna-Maria Gleixner
Date: Wed Jul 13 2016 - 13:19:31 EST


From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

All users converted to state machine callbacks.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Nicolas Iooss <nicolas.iooss_linux@xxxxxxx>
Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>
---
include/linux/cpu.h | 2 --
include/linux/perf_event.h | 35 -----------------------------------
2 files changed, 37 deletions(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 21597dc..ca2dd86 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -59,8 +59,6 @@ struct notifier_block;
* CPU notifier priorities.
*/
enum {
- CPU_PRI_PERF = 20,
-
/* bring up workqueues before normal notifiers and down after */
CPU_PRI_WORKQUEUE_UP = 5,
CPU_PRI_WORKQUEUE_DOWN = -5,
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 9abeb69..ddd3dab 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1285,41 +1285,6 @@ static inline void perf_restore_debug_store(void) { }

#define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x))

-/*
- * This has to have a higher priority than migration_notifier in sched/core.c.
- */
-#define perf_cpu_notifier(fn) \
-do { \
- static struct notifier_block fn##_nb = \
- { .notifier_call = fn, .priority = CPU_PRI_PERF }; \
- unsigned long cpu = smp_processor_id(); \
- unsigned long flags; \
- \
- cpu_notifier_register_begin(); \
- fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \
- (void *)(unsigned long)cpu); \
- local_irq_save(flags); \
- fn(&fn##_nb, (unsigned long)CPU_STARTING, \
- (void *)(unsigned long)cpu); \
- local_irq_restore(flags); \
- fn(&fn##_nb, (unsigned long)CPU_ONLINE, \
- (void *)(unsigned long)cpu); \
- __register_cpu_notifier(&fn##_nb); \
- cpu_notifier_register_done(); \
-} while (0)
-
-/*
- * Bare-bones version of perf_cpu_notifier(), which doesn't invoke the
- * callback for already online CPUs.
- */
-#define __perf_cpu_notifier(fn) \
-do { \
- static struct notifier_block fn##_nb = \
- { .notifier_call = fn, .priority = CPU_PRI_PERF }; \
- \
- __register_cpu_notifier(&fn##_nb); \
-} while (0)
-
struct perf_pmu_events_attr {
struct device_attribute attr;
u64 id;
--
2.8.1