From 0e4ee435ac293483d156db59cabb14a8445f5979 Mon Sep 17 00:00:00 2001 From: Neil Leeder Date: Thu, 30 Oct 2014 13:17:08 -0400 Subject: Perf: arm64: support hotplug and power collapse Add notifiers for hotplug and power collapse in perf events. Preserve counters and user enables across these events. Disable and enable interrupts across events. This allows perf-events to be used in an environment where cores are power collapsing and being hotplugged. Change-Id: Id27ac3b1c0733677e0bc9740ce7534c3e5fdac7c Signed-off-by: Neil Leeder [satyap: merge conflict resolution and move changes in arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c to align with kernel 4.4] Signed-off-by: Satya Durga Srinivasu Prabhala --- include/linux/perf/arm_pmu.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/perf') diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index f7bbce527649..12456debc693 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -64,6 +64,8 @@ struct pmu_hw_events { */ DECLARE_BITMAP(used_mask, ARMPMU_MAX_HWEVENTS); + u32 *from_idle; + /* * Hardware lock to serialize accesses to PMU registers. Needed for the * read/modify/write sequences. @@ -101,12 +103,15 @@ struct arm_pmu { void (*free_irq)(struct arm_pmu *); int (*map_event)(struct perf_event *event); int num_events; + int percpu_irq; atomic_t active_events; struct mutex reserve_mutex; u64 max_period; struct platform_device *plat_device; struct pmu_hw_events __percpu *hw_events; struct notifier_block hotplug_nb; + void (*save_pm_registers)(void *hcpu); + void (*restore_pm_registers)(void *hcpu); }; #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) -- cgit v1.2.3