diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2017-04-03 11:24:32 +0900 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2017-04-05 18:26:57 +0100 |
commit | 764b51ead10d5f428cb5f167bf98e336bdc23f8c (patch) | |
tree | 1f1d07162a5403a4b5d5d0305a167362d9e45d04 /arch/arm64/kernel/setup.c | |
parent | 8f579b1c4e347b23bfa747bc2cc0a55dd1b7e5fa (diff) | |
download | linux-stable-764b51ead10d5f428cb5f167bf98e336bdc23f8c.tar.gz linux-stable-764b51ead10d5f428cb5f167bf98e336bdc23f8c.tar.bz2 linux-stable-764b51ead10d5f428cb5f167bf98e336bdc23f8c.zip |
arm64: kdump: reserve memory for crash dump kernel
"crashkernel=" kernel parameter specifies the size (and optionally
the start address) of the system ram to be used by crash dump kernel.
reserve_crashkernel() will allocate and reserve that memory at boot time
of primary kernel.
The memory range will be exposed to userspace as a resource named
"Crash kernel" in /proc/iomem.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Pratyush Anand <panand@redhat.com>
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r-- | arch/arm64/kernel/setup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 42274bda0ccb..28855ec1be95 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -31,7 +31,6 @@ #include <linux/screen_info.h> #include <linux/init.h> #include <linux/kexec.h> -#include <linux/crash_dump.h> #include <linux/root_dev.h> #include <linux/cpu.h> #include <linux/interrupt.h> @@ -226,6 +225,12 @@ static void __init request_standard_resources(void) if (kernel_data.start >= res->start && kernel_data.end <= res->end) request_resource(res, &kernel_data); +#ifdef CONFIG_KEXEC_CORE + /* Userspace will find "Crash kernel" region in /proc/iomem. */ + if (crashk_res.end && crashk_res.start >= res->start && + crashk_res.end <= res->end) + request_resource(res, &crashk_res); +#endif } } |