Lines Matching +full:watchdog +full:- +full:timers

1 // SPDX-License-Identifier: GPL-2.0
3 * Watchdog support on powerpc systems.
7 * This uses code from arch/sparc/kernel/nmi.c and kernel/watchdog.c
10 #define pr_fmt(fmt) "watchdog: " fmt
35 * The powerpc watchdog ensures that each CPU is able to service timers.
36 * The watchdog sets up a simple timer on each CPU to run once per timer
37 * period, and updates a per-cpu timestamp and a "pending" cpumask. This is
41 * The local soft-NMI, and the SMP checker.
43 * The soft-NMI checker can detect lockups on the local CPU. When interrupts
44 * are disabled with local_irq_disable(), platforms that use soft-masking
47 * watchdog's soft_nmi_interrupt(), which appears to Linux as an NMI
50 * The soft-NMI checker will compare the heartbeat timestamp for this CPU
52 * watchdog threshold.
54 * The limitation of the soft-NMI watchdog is that it does not work when
56 * solved by also having a SMP watchdog where all CPUs check all other
60 * cpumask is kept, containing all CPUs which enable the watchdog. Each
66 * not been updated for a period exceeding the watchdog threshold, then it
71 * watchdog to detect an unresponsive CPU and pull it out of its stuck
73 * SMP watchdog can detect hardware interrupts off lockups.
99 * Try to take the exclusive watchdog action / NMI IPI / printing lock.
101 * for the watchdog to kick in again (or another CPU to trigger it).
131 hard_irq_disable(); /* Make it soft-NMI safe */ in wd_smp_lock()
154 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in wd_lockup_ipi()
166 * If that NMI was taken in some code that is hard-locked, then irqs in wd_lockup_ipi()
211 if ((s64)(tb - last_reset) < (s64)wd_smp_panic_timeout_tb) in watchdog_smp_panic()
236 cpu, tb, last_reset, tb_to_ns(tb - last_reset) / 1000000); in watchdog_smp_panic()
284 * watchdog so we generally should not find it empty in wd_smp_clear_cpu_pending()
290 * there is a problem with the watchdog that is causing in wd_smp_clear_cpu_pending()
308 * In the lockup case, this atomic clear-bit vs a store that refills in wd_smp_clear_cpu_pending()
354 if ((s64)(tb - wd_smp_last_reset_tb) >= (s64)wd_smp_panic_timeout_tb) in watchdog_timer_interrupt()
384 if (tb - per_cpu(wd_timer_tb, cpu) >= wd_panic_timeout_tb) { in DEFINE_INTERRUPT_HANDLER_NMI()
386 * Taking wd_smp_lock here means it is a soft-NMI lock, which in DEFINE_INTERRUPT_HANDLER_NMI()
388 * holding this lock. This is why timers can't printk while in DEFINE_INTERRUPT_HANDLER_NMI()
407 pr_emerg("CPU %d self-detected hard LOCKUP @ %pS\n", in DEFINE_INTERRUPT_HANDLER_NMI()
408 cpu, (void *)regs->nip); in DEFINE_INTERRUPT_HANDLER_NMI()
411 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in DEFINE_INTERRUPT_HANDLER_NMI()
464 if (tb - per_cpu(wd_timer_tb, cpu) >= ticks) { in arch_touch_nmi_watchdog()
499 hrtimer->function = watchdog_timer_fn; in start_watchdog()
567 * Invoked from core watchdog init.
574 "powerpc/watchdog:online", in watchdog_nmi_probe()
587 pr_info("Set the NMI watchdog timeout factor to %llu%%\n", pct); in watchdog_nmi_set_timeout_pct()