diff options
author | Sumit Garg <sumit.garg@linaro.org> | 2020-10-07 10:51:43 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-11-25 16:18:39 +0100 |
commit | 367c820ef08082e68df8a3bc12e62393af21e4b5 (patch) | |
tree | 9388278f38941afced7096bf9b16a0fe9c9a0530 /drivers/perf | |
parent | perf/imx_ddr: Add stop event counters support for i.MX8MP (diff) | |
download | linux-367c820ef08082e68df8a3bc12e62393af21e4b5.tar.xz linux-367c820ef08082e68df8a3bc12e62393af21e4b5.zip |
arm64: Enable perf events based hard lockup detector
With the recent feature added to enable perf events to use pseudo NMIs
as interrupts on platforms which support GICv3 or later, its now been
possible to enable hard lockup detector (or NMI watchdog) on arm64
platforms. So enable corresponding support.
One thing to note here is that normally lockup detector is initialized
just after the early initcalls but PMU on arm64 comes up much later as
device_initcall(). So we need to re-initialize lockup detection once
PMU has been initialized.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/1602060704-10921-1-git-send-email-sumit.garg@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_pmu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index cb2f55f450e4..794a37d50853 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -726,6 +726,11 @@ static int armpmu_get_cpu_irq(struct arm_pmu *pmu, int cpu) return per_cpu(hw_events->irq, cpu); } +bool arm_pmu_irq_is_nmi(void) +{ + return has_nmi; +} + /* * PMU hardware loses all context when a CPU goes offline. * When a CPU is hotplugged back in, since some hardware registers are |