linux/drivers/base
Sourabh Jain 79365026f8 crash: add a new kexec flag for hotplug support
Commit a72bbec70d ("crash: hotplug support for kexec_load()")
introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses
this flag to indicate to the kernel that it is safe to modify the
elfcorehdr of the kdump image loaded using the kexec_load system call.

However, it is possible that architectures may need to update kexec
segments other then elfcorehdr. For example, FDT (Flatten Device Tree)
on PowerPC. Introducing a new kexec flag for every new kexec segment
may not be a good solution. Hence, a generic kexec flag bit,
`KEXEC_CRASH_HOTPLUG_SUPPORT`, is introduced to share the CPU/Memory
hotplug support intent between the kexec tool and the kernel for the
kexec_load system call.

Now we have two kexec flags that enables crash hotplug support for
kexec_load system call. First is KEXEC_UPDATE_ELFCOREHDR (only used in
x86), and second is KEXEC_CRASH_HOTPLUG_SUPPORT (for all architectures).

To simplify the process of finding and reporting the crash hotplug
support the following changes are introduced.

1. Define arch specific function to process the kexec flags and
   determine crash hotplug support

2. Rename the @update_elfcorehdr member of struct kimage to
   @hotplug_support and populate it for both kexec_load and
   kexec_file_load syscalls, because architecture can update more than
   one kexec segment

3. Let generic function crash_check_hotplug_support report hotplug
   support for loaded kdump image based on value of @hotplug_support

To bring the x86 crash hotplug support in line with the above points,
the following changes have been made:

- Introduce the arch_crash_hotplug_support function to process kexec
  flags and determine crash hotplug support

- Remove the arch_crash_hotplug_[cpu|memory]_support functions

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240326055413.186534-3-sourabhjain@linux.ibm.com
2024-04-23 14:59:01 +10:00
..
firmware_loader firmware_loader: Suppress warning on FW_OPT_NO_WARN flag 2024-03-07 22:05:09 +00:00
power Power management updates for 6.9-rc1 2024-03-13 11:40:06 -07:00
regmap regmap: Updates for v6.9 2024-03-13 11:01:21 -07:00
test drivers: base: test: Make property entry API test modular 2023-10-05 13:11:44 +02:00
arch_numa.c arm64: irq: set the correct node for VMAP stack 2023-12-05 14:26:50 +00:00
arch_topology.c topology: Set capacity_freq_ref in all cases 2024-01-30 16:01:22 -08:00
attribute_container.c
auxiliary.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
base.h block: make block_class constant 2024-03-06 08:29:20 -07:00
bus.c driver core: bus: constantify subsys_register() calls 2023-12-21 13:55:38 +01:00
cacheinfo.c mm and cache_info: remove unnecessary CPU cache info update 2024-02-22 10:24:41 -08:00
class.c class: fix use-after-free in class_register() 2024-01-04 17:13:04 +01:00
component.c driver core: component: fix spellos 2024-01-30 15:58:06 -08:00
container.c driver core: container: make container_subsys const 2023-12-21 13:56:10 +01:00
core.c driver core: Add FWLINK_FLAG_IGNORE to completely ignore a fwnode link 2024-03-07 22:10:01 +00:00
cpu.c crash: add a new kexec flag for hotplug support 2024-04-23 14:59:01 +10:00
dd.c device: core: Log warning for devices pending deferred probe on timeout 2024-03-07 22:10:31 +00:00
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-11-28 19:39:18 +00:00
devres.c drivers/base: use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN 2023-06-19 16:19:20 -07:00
devtmpfs.c driver core: clean up the logic to determine which /sys/dev/ directory to use 2023-03-31 17:45:07 +02:00
driver.c
firmware.c
hypervisor.c
init.c drivers: base: Move cpu_dev_init() after node_dev_init() 2023-12-06 12:41:49 +09:00
isa.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
Kconfig driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT 2023-03-28 18:45:59 +02:00
Makefile
map.c
memory.c crash: add a new kexec flag for hotplug support 2024-04-23 14:59:01 +10:00
module.c
node.c cxl/region: Deal with numa nodes not enumerated by SRAT 2024-03-12 14:54:03 -07:00
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c Driver core changes for 6.9-rc1 2024-03-21 13:34:15 -07:00
platform.c driver core: platform: Annotate struct irq_affinity_devres with __counted_by 2023-10-07 18:13:09 +02:00
property.c device property: Don't use "proxy" headers 2024-03-07 22:07:26 +00:00
soc.c driver core: mark remaining local bus_type variables as const 2023-12-21 13:56:30 +01:00
swnode.c device property: Don't use "proxy" headers 2024-03-07 22:07:26 +00:00
syscore.c
topology.c
trace.c
trace.h
transport_class.c