[PATCH 3/3] arm64: Kconfig: Add support for the Perf NMI

From: Lecopzer Chen
Date: Sat May 16 2020 - 08:50:47 EST


This is an extending function for Pseudo NMI that registering
Perf events interrupts as NMI.

It's helpful for sampling irq-off context when using perf.

Signed-off-by: Lecopzer Chen <lecopzer.chen@xxxxxxxxxxxx>
---
arch/arm64/Kconfig | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 40fb05d96c60..f89c169771a0 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1679,6 +1679,16 @@ config ARM64_PSEUDO_NMI
If unsure, say N

if ARM64_PSEUDO_NMI
+config ARM64_PSEUDO_NMI_PERF
+ bool "Register Perf interrupts as Pseudo NMI"
+ depends on HW_PERF_EVENTS
+ depends on ARM_PMU
+ select HAVE_PERF_EVENTS_NMI
+ help
+ This registers Perf interrupts to NMI when Pseudo NMI is active.
+ This option is helpful when you need to debug any context disabled
+ irq and get more inforamtion.
+
+ If unsure, say N
+
config ARM64_DEBUG_PRIORITY_MASKING
bool "Debug interrupt priority masking"
help
--
2.25.1