printk: For @suppress_panic_printk check for other CPU in panic
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 7 Feb 2024 13:40:55 +0000 (14:46 +0106)
committerPetr Mladek <pmladek@suse.com>
Wed, 7 Feb 2024 16:23:18 +0000 (17:23 +0100)
commit0ab7cdd00491b532591ef065be706301de7e448f
tree77e12dae04af2aa41e4b88feecb5c78086f1d5fc
parent5113cf5f4c53eb2901ddb8fa70b72e8b6f4084ac
printk: For @suppress_panic_printk check for other CPU in panic

Currently @suppress_panic_printk is checked along with
non-matching @panic_cpu and current CPU. This works
because @suppress_panic_printk is only set when
panic_in_progress() is true.

Rather than relying on the @suppress_panic_printk semantics,
use the concise helper function other_cpu_in_progress(). The
helper function exists to avoid open coding such tests.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240207134103.1357162-7-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c