summaryrefslogtreecommitdiff
path: root/include/linux/perf
diff options
context:
space:
mode:
authorNeil Leeder <nleeder@codeaurora.org>2014-10-30 13:17:08 -0400
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:58:10 -0700
commit0e4ee435ac293483d156db59cabb14a8445f5979 (patch)
tree04fd2eea5d09e732bdf5154b646e93cfe278f19c /include/linux/perf
parent86cd54bb1953eaebbd8d466672851c545342ead0 (diff)
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 <nleeder@codeaurora.org> [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 <satyap@codeaurora.org>
Diffstat (limited to 'include/linux/perf')
-rw-r--r--include/linux/perf/arm_pmu.h5
1 files changed, 5 insertions, 0 deletions
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))