diff options
| author | Colin Cross <ccross@android.com> | 2013-01-11 13:51:48 -0800 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:54:19 -0800 |
| commit | 55d35d82b7181312d75b8fe67a90a605ffde66b9 (patch) | |
| tree | bb2d8eb7fa4530457327f93499dc68b16b092d51 /include/linux/nmi.h | |
| parent | 519ee1a3431cf4efc52f33edf3171c9666bd0ee2 (diff) | |
hardlockup: detect hard lockups without NMIs using secondary cpus
Emulate NMIs on systems where they are not available by using timer
interrupts on other cpus. Each cpu will use its softlockup hrtimer
to check that the next cpu is processing hrtimer interrupts by
verifying that a counter is increasing.
This patch is useful on systems where the hardlockup detector is not
available due to a lack of NMIs, for example most ARM SoCs.
Without this patch any cpu stuck with interrupts disabled can
cause a hardware watchdog reset with no debugging information,
but with this patch the kernel can detect the lockup and panic,
which can result in useful debugging info.
Change-Id: Ia5faf50243e19c1755201212e04c8892d929785a
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'include/linux/nmi.h')
| -rw-r--r-- | include/linux/nmi.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 7ec5b86735f3..74385351935d 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -14,8 +14,11 @@ * may be used to reset the timeout - for code which intentionally * disables interrupts for a long time. This call is stateless. */ -#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) +#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR_NMI) #include <asm/nmi.h> +#endif + +#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) extern void touch_nmi_watchdog(void); #else static inline void touch_nmi_watchdog(void) |
