Lines Matching refs:cpu
149 void watchdog_hardlockup_touch_cpu(unsigned int cpu) in watchdog_hardlockup_touch_cpu() argument
151 per_cpu(watchdog_hardlockup_touched, cpu) = true; in watchdog_hardlockup_touch_cpu()
154 static bool is_hardlockup(unsigned int cpu) in is_hardlockup() argument
156 int hrint = atomic_read(&per_cpu(hrtimer_interrupts, cpu)); in is_hardlockup()
158 if (per_cpu(hrtimer_interrupts_saved, cpu) == hrint) in is_hardlockup()
166 per_cpu(hrtimer_interrupts_saved, cpu) = hrint; in is_hardlockup()
179 void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs) in watchdog_hardlockup_check() argument
181 if (per_cpu(watchdog_hardlockup_touched, cpu)) { in watchdog_hardlockup_check()
182 per_cpu(watchdog_hardlockup_touched, cpu) = false; in watchdog_hardlockup_check()
192 if (is_hardlockup(cpu)) { in watchdog_hardlockup_check()
201 if (per_cpu(watchdog_hardlockup_warned, cpu)) in watchdog_hardlockup_check()
221 pr_emerg("CPU%u: Watchdog detected hard LOCKUP on cpu %u\n", this_cpu, cpu); in watchdog_hardlockup_check()
226 if (cpu == this_cpu) { in watchdog_hardlockup_check()
234 trigger_single_cpu_backtrace(cpu); in watchdog_hardlockup_check()
238 trigger_allbutcpu_cpu_backtrace(cpu); in watchdog_hardlockup_check()
246 per_cpu(watchdog_hardlockup_warned, cpu) = true; in watchdog_hardlockup_check()
248 per_cpu(watchdog_hardlockup_warned, cpu) = false; in watchdog_hardlockup_check()
265 void __weak watchdog_hardlockup_enable(unsigned int cpu) { } in watchdog_hardlockup_enable() argument
267 void __weak watchdog_hardlockup_disable(unsigned int cpu) { } in watchdog_hardlockup_disable() argument
655 int cpu; in touch_all_softlockup_watchdogs() local
666 for_each_cpu(cpu, &watchdog_allowed_mask) { in touch_all_softlockup_watchdogs()
667 per_cpu(watchdog_report_ts, cpu) = SOFTLOCKUP_DELAY_REPORT; in touch_all_softlockup_watchdogs()
668 wq_watchdog_touch(cpu); in touch_all_softlockup_watchdogs()
838 static void watchdog_enable(unsigned int cpu) in watchdog_enable() argument
843 WARN_ON_ONCE(cpu != smp_processor_id()); in watchdog_enable()
860 watchdog_hardlockup_enable(cpu); in watchdog_enable()
863 static void watchdog_disable(unsigned int cpu) in watchdog_disable() argument
867 WARN_ON_ONCE(cpu != smp_processor_id()); in watchdog_disable()
874 watchdog_hardlockup_disable(cpu); in watchdog_disable()
887 int cpu; in softlockup_stop_all() local
892 for_each_cpu(cpu, &watchdog_allowed_mask) in softlockup_stop_all()
893 smp_call_on_cpu(cpu, softlockup_stop_fn, NULL, false); in softlockup_stop_all()
906 int cpu; in softlockup_start_all() local
909 for_each_cpu(cpu, &watchdog_allowed_mask) in softlockup_start_all()
910 smp_call_on_cpu(cpu, softlockup_start_fn, NULL, false); in softlockup_start_all()
913 int lockup_detector_online_cpu(unsigned int cpu) in lockup_detector_online_cpu() argument
915 if (cpumask_test_cpu(cpu, &watchdog_allowed_mask)) in lockup_detector_online_cpu()
916 watchdog_enable(cpu); in lockup_detector_online_cpu()
920 int lockup_detector_offline_cpu(unsigned int cpu) in lockup_detector_offline_cpu() argument
922 if (cpumask_test_cpu(cpu, &watchdog_allowed_mask)) in lockup_detector_offline_cpu()
923 watchdog_disable(cpu); in lockup_detector_offline_cpu()