hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/kernel/watchdog_hld.c
....@@ -24,8 +24,6 @@
2424 static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
2525 static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
2626 static DEFINE_PER_CPU(struct perf_event *, dead_event);
27
-static DEFINE_RAW_SPINLOCK(watchdog_output_lock);
28
-
2927 static struct cpumask dead_events_mask;
3028
3129 static unsigned long hardlockup_allcpu_dumped;
....@@ -116,13 +114,13 @@
116114 /* Ensure the watchdog never gets throttled */
117115 event->hw.interrupts = 0;
118116
117
+ if (!watchdog_check_timestamp())
118
+ return;
119
+
119120 if (__this_cpu_read(watchdog_nmi_touch) == true) {
120121 __this_cpu_write(watchdog_nmi_touch, false);
121122 return;
122123 }
123
-
124
- if (!watchdog_check_timestamp())
125
- return;
126124
127125 /* check for a hardlockup
128126 * This is done by making sure our timer interrupt
....@@ -136,15 +134,9 @@
136134 /* only print hardlockups once */
137135 if (__this_cpu_read(hard_watchdog_warn) == true)
138136 return;
139
- /*
140
- * If early-printk is enabled then make sure we do not
141
- * lock up in printk() and kill console logging:
142
- */
143
- printk_kill();
144137
145
- raw_spin_lock(&watchdog_output_lock);
146
-
147
- pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
138
+ pr_emerg("Watchdog detected hard LOCKUP on cpu %d\n",
139
+ this_cpu);
148140 print_modules();
149141 print_irqtrace_events(current);
150142 if (regs)
....@@ -160,7 +152,6 @@
160152 !test_and_set_bit(0, &hardlockup_allcpu_dumped))
161153 trigger_allbutself_cpu_backtrace();
162154
163
- raw_spin_unlock(&watchdog_output_lock);
164155 if (hardlockup_panic)
165156 nmi_panic(regs, "Hard LOCKUP");
166157