diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 93c77623e9b5..b78d444d4943 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -27,6 +27,10 @@ #include #include +#if IS_ENABLED(CONFIG_ROCKCHIP_MINIDUMP) +#include +#endif + static DEFINE_MUTEX(watchdog_mutex); #if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG) @@ -424,12 +428,13 @@ 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, next_cpu, NULL); + if (hardlockup_panic) panic("Watchdog detected hard LOCKUP on cpu %u", next_cpu); else WARN(1, "Watchdog detected hard LOCKUP on cpu %u", next_cpu); - atomic_notifier_call_chain(&hardlock_notifier_list, 0, NULL); per_cpu(hard_watchdog_warn, next_cpu) = true; } else { per_cpu(hard_watchdog_warn, next_cpu) = false; @@ -557,6 +562,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) } add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); +#if IS_ENABLED(CONFIG_ROCKCHIP_MINIDUMP) + rk_minidump_update_cpu_regs(regs); +#endif if (softlockup_panic) panic("softlockup: hung tasks"); }