Lines Matching refs:cpu
148 int cpu = raw_smp_processor_id(); in wd_lockup_ipi() local
151 pr_emerg("CPU %d Hard LOCKUP\n", cpu); in wd_lockup_ipi()
153 cpu, tb, per_cpu(wd_timer_tb, cpu), in wd_lockup_ipi()
154 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in wd_lockup_ipi()
182 static bool set_cpu_stuck(int cpu) in set_cpu_stuck() argument
184 cpumask_set_cpu(cpu, &wd_smp_cpus_stuck); in set_cpu_stuck()
185 cpumask_clear_cpu(cpu, &wd_smp_cpus_pending); in set_cpu_stuck()
200 static void watchdog_smp_panic(int cpu) in watchdog_smp_panic() argument
213 if (cpumask_test_cpu(cpu, &wd_smp_cpus_pending)) in watchdog_smp_panic()
220 if (c == cpu) in watchdog_smp_panic()
234 cpu, cpumask_pr_args(&wd_smp_cpus_ipi)); in watchdog_smp_panic()
236 cpu, tb, last_reset, tb_to_ns(tb - last_reset) / 1000000); in watchdog_smp_panic()
248 trigger_allbutcpu_cpu_backtrace(cpu); in watchdog_smp_panic()
263 static void wd_smp_clear_cpu_pending(int cpu) in wd_smp_clear_cpu_pending() argument
265 if (!cpumask_test_cpu(cpu, &wd_smp_cpus_pending)) { in wd_smp_clear_cpu_pending()
266 if (unlikely(cpumask_test_cpu(cpu, &wd_smp_cpus_stuck))) { in wd_smp_clear_cpu_pending()
271 cpu, get_tb()); in wd_smp_clear_cpu_pending()
279 cpumask_clear_cpu(cpu, &wd_smp_cpus_stuck); in wd_smp_clear_cpu_pending()
315 cpumask_clear_cpu(cpu, &wd_smp_cpus_pending); in wd_smp_clear_cpu_pending()
346 static void watchdog_timer_interrupt(int cpu) in watchdog_timer_interrupt() argument
350 per_cpu(wd_timer_tb, cpu) = tb; in watchdog_timer_interrupt()
352 wd_smp_clear_cpu_pending(cpu); in watchdog_timer_interrupt()
355 watchdog_smp_panic(cpu); in watchdog_timer_interrupt()
372 int cpu = raw_smp_processor_id(); in DEFINE_INTERRUPT_HANDLER_NMI() local
378 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) in DEFINE_INTERRUPT_HANDLER_NMI()
384 if (tb - per_cpu(wd_timer_tb, cpu) >= wd_panic_timeout_tb) { in DEFINE_INTERRUPT_HANDLER_NMI()
392 if (cpumask_test_cpu(cpu, &wd_smp_cpus_stuck)) { in DEFINE_INTERRUPT_HANDLER_NMI()
403 set_cpu_stuck(cpu); in DEFINE_INTERRUPT_HANDLER_NMI()
408 cpu, (void *)regs->nip); in DEFINE_INTERRUPT_HANDLER_NMI()
410 cpu, tb, per_cpu(wd_timer_tb, cpu), in DEFINE_INTERRUPT_HANDLER_NMI()
411 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in DEFINE_INTERRUPT_HANDLER_NMI()
419 trigger_allbutcpu_cpu_backtrace(cpu); in DEFINE_INTERRUPT_HANDLER_NMI()
439 int cpu = smp_processor_id(); in watchdog_timer_fn() local
444 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) in watchdog_timer_fn()
447 watchdog_timer_interrupt(cpu); in watchdog_timer_fn()
457 int cpu = smp_processor_id(); in arch_touch_nmi_watchdog() local
460 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) in arch_touch_nmi_watchdog()
464 if (tb - per_cpu(wd_timer_tb, cpu) >= ticks) { in arch_touch_nmi_watchdog()
465 per_cpu(wd_timer_tb, cpu) = tb; in arch_touch_nmi_watchdog()
466 wd_smp_clear_cpu_pending(cpu); in arch_touch_nmi_watchdog()
474 int cpu = smp_processor_id(); in start_watchdog() local
477 if (cpumask_test_cpu(cpu, &wd_cpus_enabled)) { in start_watchdog()
485 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) in start_watchdog()
489 cpumask_set_cpu(cpu, &wd_cpus_enabled); in start_watchdog()
491 cpumask_set_cpu(cpu, &wd_smp_cpus_pending); in start_watchdog()
504 static int start_watchdog_on_cpu(unsigned int cpu) in start_watchdog_on_cpu() argument
506 return smp_call_function_single(cpu, start_watchdog, NULL, true); in start_watchdog_on_cpu()
512 int cpu = smp_processor_id(); in stop_watchdog() local
515 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) in stop_watchdog()
521 cpumask_clear_cpu(cpu, &wd_cpus_enabled); in stop_watchdog()
524 wd_smp_clear_cpu_pending(cpu); in stop_watchdog()
527 static int stop_watchdog_on_cpu(unsigned int cpu) in stop_watchdog_on_cpu() argument
529 return smp_call_function_single(cpu, stop_watchdog, NULL, true); in stop_watchdog_on_cpu()
551 int cpu; in watchdog_hardlockup_stop() local
553 for_each_cpu(cpu, &wd_cpus_enabled) in watchdog_hardlockup_stop()
554 stop_watchdog_on_cpu(cpu); in watchdog_hardlockup_stop()
559 int cpu; in watchdog_hardlockup_start() local
562 for_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask) in watchdog_hardlockup_start()
563 start_watchdog_on_cpu(cpu); in watchdog_hardlockup_start()