watchdog/hardlockup: add hardlock_notifier_list
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Change-Id: Id469d3c5a38f0bcb43a13a5c2263b53cf327154b
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user