Lines Matching +full:atomic +full:- +full:threshold +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0
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
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
66 * not been updated for a period exceeding the watchdog threshold, then 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()
172 * the console drivers for us. 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()
301 * wd_smp_lock. All of them are atomic except the case where the in wd_smp_clear_cpu_pending()
305 * hard lockup on our CPU and takes us out of the pending mask. So in 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()
310 * is atomic so it will not cause the store to get lost, and the store 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()
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()
534 u64 threshold = watchdog_thresh; in watchdog_calc_timeouts() local
537 threshold += (READ_ONCE(wd_timeout_pct) * threshold) / 100; in watchdog_calc_timeouts()
540 wd_panic_timeout_tb = threshold * ppc_tb_freq; in watchdog_calc_timeouts()