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 */
154 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000);
166 * If that NMI was taken in some code that is hard-locked, then irqs
172 * the console drivers for us.
211 if ((s64)(tb - last_reset) < (s64)wd_smp_panic_timeout_tb)
236 cpu, tb, last_reset, tb_to_ns(tb - last_reset) / 1000000);
301 * wd_smp_lock. All of them are atomic except the case where the
305 * hard lockup on our CPU and takes us out of the pending mask. So in
308 * In the lockup case, this atomic clear-bit vs a store that refills
310 * is atomic so it will not cause the store to get lost, and the store
354 if ((s64)(tb - wd_smp_last_reset_tb) >= (s64)wd_smp_panic_timeout_tb)
384 if (tb - per_cpu(wd_timer_tb, cpu) >= wd_panic_timeout_tb) {
386 * Taking wd_smp_lock here means it is a soft-NMI lock, which
407 pr_emerg("CPU %d self-detected hard LOCKUP @ %pS\n",
408 cpu, (void *)regs->nip);
411 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000);
464 if (tb - per_cpu(wd_timer_tb, cpu) >= ticks) {
533 u64 threshold = watchdog_thresh;
536 threshold += (READ_ONCE(wd_timeout_pct) * threshold) / 100;
539 wd_panic_timeout_tb = threshold * ppc_tb_freq;