From c079e157fd833cf3650705dc5caea5dd867e55f8 Mon Sep 17 00:00:00 2001 From: Patrick Fay Date: Fri, 14 Apr 2017 10:14:02 -0700 Subject: Perf: arm64: disable irq for hotplug offline Currently the hotplug notifier calls cpu_pmu_enable_percpu_irq when a CPU comes online. The notifier doesn't have a corresponding call to cpu_pmu_disable_percpu_irq when the CPU goes offline. Change the code to follow what was done in 3.18 including tracking whether the PMU is active and the IRQ number in use. Change-Id: I1835fb543eb483713a30eb6c0ccd4e4a4b9908be Signed-off-by: Patrick Fay --- include/linux/perf/arm_pmu.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux') diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 654bb97a3188..5bc4836af286 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -77,6 +77,12 @@ struct pmu_hw_events { struct arm_pmu *percpu_pmu; }; +enum armpmu_pmu_states { + ARM_PMU_STATE_OFF, + ARM_PMU_STATE_RUNNING, + ARM_PMU_STATE_GOING_DOWN, +}; + struct arm_pmu { struct pmu pmu; cpumask_t active_irqs; @@ -101,6 +107,8 @@ struct arm_pmu { void (*free_irq)(struct arm_pmu *); int (*map_event)(struct perf_event *event); int num_events; + int pmu_state; + int percpu_irq; atomic_t active_events; struct mutex reserve_mutex; u64 max_period; -- cgit v1.2.3