Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / include / linux / perf_event.h
index e1f921c..8ed4326 100644 (file)
@@ -1309,41 +1309,6 @@ static __always_inline bool perf_raw_frag_last(const struct perf_raw_frag *frag)
 
 #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;
@@ -1385,4 +1350,13 @@ _name##_show(struct device *dev,                                 \
                                                                        \
 static struct device_attribute format_attr_##_name = __ATTR_RO(_name)
 
+/* Performance counter hotplug functions */
+#ifdef CONFIG_PERF_EVENTS
+int perf_event_init_cpu(unsigned int cpu);
+int perf_event_exit_cpu(unsigned int cpu);
+#else
+#define perf_event_init_cpu    NULL
+#define perf_event_exit_cpu    NULL
+#endif
+
 #endif /* _LINUX_PERF_EVENT_H */