[PATCH] watchdog: output this_cpu when printing hard LOCKUP

From: Yunhui Cui
Date: Tue Dec 10 2024 - 04:56:54 EST


When printing "Watchdog detected hard LOCKUP on cpu", also output
the detecting CPU. It's more intuitive.

Signed-off-by: Yunhui Cui <cuiyunhui@xxxxxxxxxxxxx>
---
kernel/watchdog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 262691ba62b7a..718e8c6fbe277 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -190,7 +190,7 @@ void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
* with printk_cpu_sync_get_irqsave() that we can still at least
* get the message about the lockup out.
*/
- pr_emerg("Watchdog detected hard LOCKUP on cpu %d\n", cpu);
+ pr_emerg("CPU%u: Watchdog detected hard LOCKUP on cpu %u\n", this_cpu, cpu);
printk_cpu_sync_get_irqsave(flags);

print_modules();
--
2.39.2