diff options
| author | Rui Qi <qirui.001@bytedance.com> | 2026-10-05 19:02:53 -0600 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-10-05 19:02:53 -0600 |
| commit | 8be4655bc96c3278adcb7aad9b68bd54440058dc (patch) | |
| tree | 6d8ec8b6cd5d877ace73e61f48593b0a7bcbe46c /include/linux/workqueue_api.h | |
| parent | f89e5ee4d8c6cd56499cd87e550d4d4e19cf7e17 (diff) | |
riscv: crash: Add crash hotplug support
When CPUs or memory are hot-plugged on a running system, the crash
dump's elfcorehdr -- which describes the available CPUs and memory to
the capture kernel -- must be kept in sync, otherwise a crash after a
hotplug event would produce a vmcore that does not reflect the current
system topology.
Enable crash hotplug for RISC-V by selecting
ARCH_SUPPORTS_CRASH_HOTPLUG and providing the three architecture hooks
invoked through the override macros in <asm/kexec.h>:
arch_crash_hotplug_support() reports whether an image supports the
mechanism; arch_crash_get_elfcorehdr_size() sizes the segment for
NR_CPUS and, with memory hotplug, CRASH_MAX_MEMORY_RANGES;
arch_crash_handle_hotplug_event() rebuilds the elfcorehdr through the
crash_prepare_headers() helper and writes it over the old segment.
The elfcorehdr is copied with memcpy_flushcache(), matching the x86
implementation; on RISC-V this currently expands to a plain memcpy()
and will benefit automatically once the architecture provides a
flushcache backend. The implementation otherwise follows the x86 crash
hotplug model.
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Tested-by: Rui Qi <qirui.001@bytedance.com>
Link: https://patch.msgid.link/20260910032619.2477279-1-qirui.001@bytedance.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
