summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPatrick Fay <pfay@codeaurora.org>2017-04-14 10:14:02 -0700
committerPatrick Fay <pfay@codeaurora.org>2017-04-14 10:24:02 -0700
commitc079e157fd833cf3650705dc5caea5dd867e55f8 (patch)
tree5f405919c54c1864522f442a46d3d3a66beff510 /include/linux
parent406ab7d2d4f3a72f3ef1dd10f894e6c88ee3ac01 (diff)
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 <pfay@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/perf/arm_pmu.h8
1 files changed, 8 insertions, 0 deletions
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;