aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2016-07-11 16:24:34 +0100
committerMoyster <oysterized@gmail.com>2016-11-07 13:46:49 +0100
commit2887bc5181e3ec626e0e2ebebeab40b0e88285e3 (patch)
treeb3bebbcc65d146bdd148a399f10be2d913d07802 /arch/arm64/include
parent7db3ae6a43aac5e1fb2feeee53ddc1123cec50ec (diff)
arm64: kernel: perf: add cpu hotplug notifier
When a CPU is taken offline, its PMU registers content is lost and needs to be reset on power up, since for most of the PMU registers content is UNKNOWN upon CPU reset. This patch implements a cpu hotplug notifier and hooks the reset call in the respective notifier callback function. Cc: Will Deacon <will.deacon at arm.com> Cc: Mark Rutland <mark.rutland at arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com> Change-Id: I779158c4edb4e88f15d9bfebf6cf8af208a64259 Ticket: PORRIDGE-450
Diffstat (limited to 'arch/arm64/include')
-rw-r--r--arch/arm64/include/asm/pmu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/pmu.h b/arch/arm64/include/asm/pmu.h
index e6f087806..35d27dbc8 100644
--- a/arch/arm64/include/asm/pmu.h
+++ b/arch/arm64/include/asm/pmu.h
@@ -64,6 +64,8 @@ struct arm_pmu {
u64 max_period;
struct platform_device *plat_device;
struct pmu_hw_events *(*get_hw_events)(void);
+ struct notifier_block hotplug_nb;
+ struct notifier_block cpu_pm_nb;
};
#define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu))