Lines Matching refs:cpu

114 	int cpu = raw_smp_processor_id();  in wd_lockup_ipi()  local
117 pr_emerg("CPU %d Hard LOCKUP\n", cpu); in wd_lockup_ipi()
119 cpu, tb, per_cpu(wd_timer_tb, cpu), in wd_lockup_ipi()
120 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in wd_lockup_ipi()
142 static void set_cpu_stuck(int cpu, u64 tb) in set_cpu_stuck() argument
144 set_cpumask_stuck(cpumask_of(cpu), tb); in set_cpu_stuck()
147 static void watchdog_smp_panic(int cpu, u64 tb) in watchdog_smp_panic() argument
156 if (cpumask_test_cpu(cpu, &wd_smp_cpus_pending)) in watchdog_smp_panic()
162 cpu, cpumask_pr_args(&wd_smp_cpus_pending)); in watchdog_smp_panic()
164 cpu, tb, wd_smp_last_reset_tb, in watchdog_smp_panic()
173 if (c == cpu) in watchdog_smp_panic()
201 static void wd_smp_clear_cpu_pending(int cpu, u64 tb) in wd_smp_clear_cpu_pending() argument
203 if (!cpumask_test_cpu(cpu, &wd_smp_cpus_pending)) { in wd_smp_clear_cpu_pending()
204 if (unlikely(cpumask_test_cpu(cpu, &wd_smp_cpus_stuck))) { in wd_smp_clear_cpu_pending()
211 cpu, tb); in wd_smp_clear_cpu_pending()
218 cpumask_clear_cpu(cpu, &wd_smp_cpus_stuck); in wd_smp_clear_cpu_pending()
223 cpumask_clear_cpu(cpu, &wd_smp_cpus_pending); in wd_smp_clear_cpu_pending()
238 static void watchdog_timer_interrupt(int cpu) in watchdog_timer_interrupt() argument
242 per_cpu(wd_timer_tb, cpu) = tb; in watchdog_timer_interrupt()
244 wd_smp_clear_cpu_pending(cpu, tb); in watchdog_timer_interrupt()
247 watchdog_smp_panic(cpu, tb); in watchdog_timer_interrupt()
253 int cpu = raw_smp_processor_id(); in soft_nmi_interrupt() local
256 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) in soft_nmi_interrupt()
264 if (tb - per_cpu(wd_timer_tb, cpu) >= wd_panic_timeout_tb) { in soft_nmi_interrupt()
266 if (cpumask_test_cpu(cpu, &wd_smp_cpus_stuck)) { in soft_nmi_interrupt()
270 set_cpu_stuck(cpu, tb); in soft_nmi_interrupt()
273 cpu, (void *)regs->nip); in soft_nmi_interrupt()
275 cpu, tb, per_cpu(wd_timer_tb, cpu), in soft_nmi_interrupt()
276 tb_to_ns(tb - per_cpu(wd_timer_tb, cpu)) / 1000000); in soft_nmi_interrupt()
298 int cpu = smp_processor_id(); in watchdog_timer_fn() local
303 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) in watchdog_timer_fn()
306 watchdog_timer_interrupt(cpu); in watchdog_timer_fn()
316 int cpu = smp_processor_id(); in arch_touch_nmi_watchdog() local
319 if (tb - per_cpu(wd_timer_tb, cpu) >= ticks) { in arch_touch_nmi_watchdog()
320 per_cpu(wd_timer_tb, cpu) = tb; in arch_touch_nmi_watchdog()
321 wd_smp_clear_cpu_pending(cpu, tb); in arch_touch_nmi_watchdog()
329 int cpu = smp_processor_id(); in start_watchdog() local
332 if (cpumask_test_cpu(cpu, &wd_cpus_enabled)) { in start_watchdog()
340 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) in start_watchdog()
344 cpumask_set_cpu(cpu, &wd_cpus_enabled); in start_watchdog()
346 cpumask_set_cpu(cpu, &wd_smp_cpus_pending); in start_watchdog()
359 static int start_watchdog_on_cpu(unsigned int cpu) in start_watchdog_on_cpu() argument
361 return smp_call_function_single(cpu, start_watchdog, NULL, true); in start_watchdog_on_cpu()
367 int cpu = smp_processor_id(); in stop_watchdog() local
370 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) in stop_watchdog()
376 cpumask_clear_cpu(cpu, &wd_cpus_enabled); in stop_watchdog()
379 wd_smp_clear_cpu_pending(cpu, get_tb()); in stop_watchdog()
382 static int stop_watchdog_on_cpu(unsigned int cpu) in stop_watchdog_on_cpu() argument
384 return smp_call_function_single(cpu, stop_watchdog, NULL, true); in stop_watchdog_on_cpu()
400 int cpu; in watchdog_nmi_stop() local
402 for_each_cpu(cpu, &wd_cpus_enabled) in watchdog_nmi_stop()
403 stop_watchdog_on_cpu(cpu); in watchdog_nmi_stop()
408 int cpu; in watchdog_nmi_start() local
411 for_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask) in watchdog_nmi_start()
412 start_watchdog_on_cpu(cpu); in watchdog_nmi_start()