linux/arch/powerpc
Jocelyn Falempe e1a261ba59 printk: Add a short description string to kmsg_dump()
kmsg_dump doesn't forward the panic reason string to the kmsg_dumper
callback.
This patch adds a new struct kmsg_dump_detail, that will hold the
reason and description, and pass it to the dump() callback.

To avoid updating all kmsg_dump() call, it adds a kmsg_dump_desc()
function and a macro for backward compatibility.

I've written this for drm_panic, but it can be useful for other
kmsg_dumper.
It allows to see the panic reason, like "sysrq triggered crash"
or "VFS: Unable to mount root fs on xxxx" on the drm panic screen.

v2:
 * Use a struct kmsg_dump_detail to hold the reason and description
   pointer, for more flexibility if we want to add other parameters.
   (Kees Cook)
 * Fix powerpc/nvram_64 build, as I didn't update the forward
   declaration of oops_to_nvram()

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Petr Mladek <pmladek@suse.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Acked-by: Kees Cook <kees@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240702122639.248110-1-jfalempe@redhat.com
2024-07-17 12:35:24 +02:00
..
boot Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
configs printk changes for 6.10 2024-05-15 12:34:46 -07:00
crypto powerpc/crypto/chacha-p10: Fix failure on non Power10 2024-04-05 00:02:18 +11:00
include tracing: Remove second argument of __assign_str() 2024-05-23 12:28:01 -07:00
kernel printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
kexec powerpc/crash: remove unnecessary NULL check before kvfree() 2024-05-03 12:20:50 +10:00
kvm powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
lib powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
math-emu
mm The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
net powerpc/bpf/32: Fix failing test_bpf tests 2024-05-07 22:17:02 +10:00
perf driver core: Add device_show_string() helper for sysfs attributes 2024-05-04 17:37:03 +02:00
platforms printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
sysdev powerpc: Fix typos 2024-05-08 00:21:30 +10:00
tools powerpc/tools: Pass -mabi=elfv2 to gcc-check-mprofile-kernel.sh 2023-10-20 17:46:33 +11:00
xmon powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#" 2024-05-08 00:48:32 +10:00
Kbuild powerpc: Fix fatal warnings flag for LLVM's integrated assembler 2024-04-08 16:06:41 +10:00
Kconfig powerpc: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:18 -07:00
Kconfig.debug powerpc/ps3: move udbg_shutdown_ps3gelic prototype 2023-11-21 12:06:50 +11:00
Makefile powerpc: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:18 -07:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00