[lkml]   [2019]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[RFC PATCH v2 09/14] watchdog/hardlockup: Make arch_touch_nmi_watchdog() to hpet-based implementation
CPU architectures that have an NMI watchdog use arch_touch_nmi_watchdog()
to briefly ignore the hardlockup detector. If the architecture does not
have an NMI watchdog, one can be constructed using a source of non-
maskable interrupts. In this case, arch_touch_nmi_watchdog() is common
to any underlying hardware resource used to drive the detector and needs
to be available to other kernel subsystems if hardware different from perf
drives the detector.

There exists perf-based and HPET-based implementations. Make it available
to the latter.

For clarity, wrap this function in a separate preprocessor conditional
from functions which are truly specific to the perf-based implementation.

Cc: "H. Peter Anvin" <>
Cc: Ashok Raj <>
Cc: Andi Kleen <>
Cc: Tony Luck <>
Cc: "Rafael J. Wysocki" <>
Cc: Don Zickus <>
Cc: Nicholas Piggin <>
Cc: Michael Ellerman <>
Cc: Frederic Weisbecker <>
Cc: Alexei Starovoitov <>
Cc: Babu Moger <>
Cc: "David S. Miller" <>
Cc: Benjamin Herrenschmidt <>
Cc: Paul Mackerras <>
Cc: Mathieu Desnoyers <>
Cc: Masami Hiramatsu <>
Cc: Peter Zijlstra <>
Cc: Andrew Morton <>
Cc: Philippe Ombredanne <>
Cc: Colin Ian King <>
Cc: Byungchul Park <>
Cc: "Paul E. McKenney" <>
Cc: "Luis R. Rodriguez" <>
Cc: Waiman Long <>
Cc: Josh Poimboeuf <>
Cc: Randy Dunlap <>
Cc: Davidlohr Bueso <>
Cc: Christoffer Dall <>
Cc: Marc Zyngier <>
Cc: Kai-Heng Feng <>
Cc: Konrad Rzeszutek Wilk <>
Cc: David Rientjes <>
Cc: "Ravi V. Shankar" <>
Signed-off-by: Ricardo Neri <>
include/linux/nmi.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 5a8b19749769..bf5ebcfdd590 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -94,8 +94,16 @@ static inline void hardlockup_detector_disable(void) {}

extern void arch_touch_nmi_watchdog(void);
+static inline void arch_touch_nmi_watchdog(void) {}
+# endif
extern void hardlockup_detector_perf_stop(void);
extern void hardlockup_detector_perf_restart(void);
extern void hardlockup_detector_perf_disable(void);
 \ /
  Last update: 2019-02-27 17:07    [W:0.412 / U:51.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site