| From: Yunhui Cui <cuiyunhui@bytedance.com> |
| Subject: watchdog: output this_cpu when printing hard LOCKUP |
| Date: Tue, 10 Dec 2024 17:52:38 +0800 |
| |
| When printing "Watchdog detected hard LOCKUP on cpu", also output the |
| detecting CPU. It's more intuitive. |
| |
| Link: https://lkml.kernel.org/r/20241210095238.63444-1-cuiyunhui@bytedance.com |
| Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> |
| Reviewed-by: Douglas Anderson <dianders@chromium.org> |
| Cc: Bitao Hu <yaoma@linux.alibaba.com> |
| Cc: Joel Granados <joel.granados@kernel.org> |
| Cc: John Ogness <john.ogness@linutronix.de> |
| Cc: Liu Song <liusong@linux.alibaba.com> |
| Cc: Song Liu <song@kernel.org> |
| Cc: Thomas Weißschuh <linux@weissschuh.net> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| kernel/watchdog.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/kernel/watchdog.c~watchdog-output-this_cpu-when-printing-hard-lockup |
| +++ a/kernel/watchdog.c |
| @@ -190,7 +190,7 @@ void watchdog_hardlockup_check(unsigned |
| * 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(); |
| _ |