]> nv-tegra.nvidia Code Review - linux-4.9.git/commit
ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus
authorColin Cross <ccross@android.com>
Fri, 12 Oct 2018 07:33:59 +0000 (15:33 +0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 8 Nov 2018 17:15:50 +0000 (09:15 -0800)
commita406d970dda1096a1c87296d93923a04c951cda7
tree71fbc1670923103438bef1fc36006af99c81751d
parented5e8b0bfbd27a1207823652a47f447a4e80cd97
ANDROID: 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.

Bug 200459527

Change-Id: I83d6837cafcc6d6e7a70352f5a4d09c0ede1d8a4
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Kary Jin <karyj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1929802
(cherry picked from commit c039614dcce22309387769378d722b4c37bd352d)
Reviewed-on: https://git-master.nvidia.com/r/1934166
GVS: Gerrit_Virtual_Submit
Reviewed-by: Daniel Fu <danifu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
include/linux/nmi.h
kernel/watchdog.c
kernel/watchdog_hld.c
kernel/watchdog_hld.h [new file with mode: 0644]
lib/Kconfig.debug