watchdog/hardlockup: add hardlock_notifier_list

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Id469d3c5a38f0bcb43a13a5c2263b53cf327154b
This commit is contained in:
Huibin Hong
2022-09-09 03:30:53 +00:00
committed by Tao Huang
parent 1d1f5d7dc0
commit 2375ff3d09

View File

@ -50,6 +50,9 @@ struct cpumask watchdog_cpumask __read_mostly;
unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask);
#ifdef CONFIG_HARDLOCKUP_DETECTOR
ATOMIC_NOTIFIER_HEAD(hardlock_notifier_list);
/*
* Should we panic when a soft-lockup or hard-lockup occurs:
*/
@ -423,6 +426,8 @@ static void watchdog_check_hardlockup_other_cpu(void)
if (per_cpu(hard_watchdog_warn, next_cpu) == true)
return;
atomic_notifier_call_chain(&hardlock_notifier_list, 0, NULL);
if (hardlockup_panic)
panic("Watchdog detected hard LOCKUP on cpu %u", next_cpu);
else