#define pr_fmt(fmt) …
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/reboot.h>
#include <linux/kexec.h>
#include <linux/delay.h>
#include <linux/elf.h>
#include <linux/elfcore.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/memblock.h>
#include <asm/bootparam.h>
#include <asm/processor.h>
#include <asm/hardirq.h>
#include <asm/nmi.h>
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/e820/types.h>
#include <asm/io_apic.h>
#include <asm/hpet.h>
#include <linux/kdebug.h>
#include <asm/cpu.h>
#include <asm/reboot.h>
#include <asm/intel_pt.h>
#include <asm/crash.h>
#include <asm/cmdline.h>
#include <asm/sev.h>
struct crash_memmap_data { … };
#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
static void kdump_nmi_callback(int cpu, struct pt_regs *regs)
{ … }
void kdump_nmi_shootdown_cpus(void)
{ … }
void crash_smp_send_stop(void)
{ … }
#else
void crash_smp_send_stop(void)
{
}
#endif
void native_machine_crash_shutdown(struct pt_regs *regs)
{ … }
#if defined(CONFIG_KEXEC_FILE) || defined(CONFIG_CRASH_HOTPLUG)
static int get_nr_ram_ranges_callback(struct resource *res, void *arg)
{ … }
static struct crash_mem *fill_up_crash_elf_data(void)
{ … }
static int elf_header_exclude_ranges(struct crash_mem *cmem)
{ … }
static int prepare_elf64_ram_headers_callback(struct resource *res, void *arg)
{ … }
static int prepare_elf_headers(void **addr, unsigned long *sz,
unsigned long *nr_mem_ranges)
{ … }
#endif
#ifdef CONFIG_KEXEC_FILE
static int add_e820_entry(struct boot_params *params, struct e820_entry *entry)
{ … }
static int memmap_entry_callback(struct resource *res, void *arg)
{ … }
static int memmap_exclude_ranges(struct kimage *image, struct crash_mem *cmem,
unsigned long long mstart,
unsigned long long mend)
{ … }
int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
{ … }
int crash_load_segments(struct kimage *image)
{ … }
#endif
#ifdef CONFIG_CRASH_HOTPLUG
#undef pr_fmt
#define pr_fmt(fmt) …
int arch_crash_hotplug_support(struct kimage *image, unsigned long kexec_flags)
{ … }
unsigned int arch_crash_get_elfcorehdr_size(void)
{ … }
void arch_crash_handle_hotplug_event(struct kimage *image, void *arg)
{ … }
#endif