diff options
author | Russell King <[email protected]> | 2016-08-02 14:05:48 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-08-02 19:35:25 -0400 |
commit | f7f0b7dc720f81b53afffb6779437086cdc3f62d (patch) | |
tree | deca76a46a03e67d2ce69762c14c4bf930b287da | |
parent | 4caf9615247aceab56e91df6c0e11892ea55f4f0 (diff) |
ARM: kdump: advertise boot aliased crash kernel resource
Advertise a resource which describes where the crash kernel is located
in the boot view of RAM. This allows kexec-tools to have this vital
information.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Russell King <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Keerthy <[email protected]>
Cc: Pratyush Anand <[email protected]>
Cc: Vitaly Andrianov <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: Simon Horman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | arch/arm/kernel/setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index da2f6c360f6b..6c8c888c1152 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1000,9 +1000,25 @@ static void __init reserve_crashkernel(void) (unsigned long)(crash_base >> 20), (unsigned long)(total_mem >> 20)); + /* The crashk resource must always be located in normal mem */ crashk_res.start = crash_base; crashk_res.end = crash_base + crash_size - 1; insert_resource(&iomem_resource, &crashk_res); + + if (arm_has_idmap_alias()) { + /* + * If we have a special RAM alias for use at boot, we + * need to advertise to kexec tools where the alias is. + */ + static struct resource crashk_boot_res = { + .name = "Crash kernel (boot alias)", + .flags = IORESOURCE_BUSY | IORESOURCE_MEM, + }; + + crashk_boot_res.start = phys_to_idmap(crash_base); + crashk_boot_res.end = crashk_boot_res.start + crash_size - 1; + insert_resource(&iomem_resource, &crashk_boot_res); + } } #else static inline void reserve_crashkernel(void) {} |