hardlockup: detect hard lockups without NMIs using secondary cpus
authorColin Cross <ccross@android.com>
Fri, 11 Jan 2013 21:51:48 +0000 (13:51 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:54:19 +0000 (13:54 -0800)
commit55d35d82b7181312d75b8fe67a90a605ffde66b9
treebb2d8eb7fa4530457327f93499dc68b16b092d51
parent519ee1a3431cf4efc52f33edf3171c9666bd0ee2
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>
include/linux/nmi.h
kernel/watchdog.c
lib/Kconfig.debug