mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
e53d28180d
This patch adds support for kdump, the kernel will reserve a region for the crash kernel and jump there on panic. In order for userspace tools (kexec-tools) to prepare the crash kernel kexec image, we also need to expose some information on /proc/iomem for the memory regions used by the kernel and for the region reserved for crash kernel. Note that on userspace the device tree is used to determine the system's memory layout so the "System RAM" on /proc/iomem is ignored. I tested this on riscv64 qemu and works as expected, you may test it by triggering a crash through /proc/sysrq_trigger: echo c > /proc/sysrq_trigger Signed-off-by: Nick Kossifidis <mick@ics.forth.gr> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
66 lines
1.6 KiB
Makefile
66 lines
1.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for the RISC-V Linux kernel
|
|
#
|
|
|
|
ifdef CONFIG_FTRACE
|
|
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
ifdef CONFIG_KEXEC
|
|
AFLAGS_kexec_relocate.o := -mcmodel=medany -mno-relax
|
|
endif
|
|
|
|
extra-y += head.o
|
|
extra-y += vmlinux.lds
|
|
|
|
obj-y += soc.o
|
|
obj-y += cpu.o
|
|
obj-y += cpufeature.o
|
|
obj-y += entry.o
|
|
obj-y += irq.o
|
|
obj-y += process.o
|
|
obj-y += ptrace.o
|
|
obj-y += reset.o
|
|
obj-y += setup.o
|
|
obj-y += signal.o
|
|
obj-y += syscall_table.o
|
|
obj-y += sys_riscv.o
|
|
obj-y += time.o
|
|
obj-y += traps.o
|
|
obj-y += riscv_ksyms.o
|
|
obj-y += stacktrace.o
|
|
obj-y += cacheinfo.o
|
|
obj-y += patch.o
|
|
obj-y += probes/
|
|
obj-$(CONFIG_MMU) += vdso.o vdso/
|
|
|
|
obj-$(CONFIG_RISCV_M_MODE) += traps_misaligned.o
|
|
obj-$(CONFIG_FPU) += fpu.o
|
|
obj-$(CONFIG_SMP) += smpboot.o
|
|
obj-$(CONFIG_SMP) += smp.o
|
|
obj-$(CONFIG_SMP) += cpu_ops.o
|
|
obj-$(CONFIG_SMP) += cpu_ops_spinwait.o
|
|
obj-$(CONFIG_MODULES) += module.o
|
|
obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
|
|
|
|
obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
|
|
obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
|
|
|
|
obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o
|
|
obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
|
|
obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
|
|
obj-$(CONFIG_RISCV_SBI) += sbi.o
|
|
ifeq ($(CONFIG_RISCV_SBI), y)
|
|
obj-$(CONFIG_SMP) += cpu_ops_sbi.o
|
|
endif
|
|
obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
|
|
obj-$(CONFIG_KGDB) += kgdb.o
|
|
obj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o
|
|
|
|
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
|
|
|
|
obj-$(CONFIG_EFI) += efi.o
|