diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-08-02 17:05:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 19:35:25 -0400 |
commit | f7f0b7dc720f81b53afffb6779437086cdc3f62d (patch) | |
tree | deca76a46a03e67d2ce69762c14c4bf930b287da /arch/arm/kernel/setup.c | |
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/E1b8knz-0004H4-Bd@rmk-PC.armlinux.org.uk
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Baoquan He <bhe@redhat.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-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) | |||
1000 | (unsigned long)(crash_base >> 20), | 1000 | (unsigned long)(crash_base >> 20), |
1001 | (unsigned long)(total_mem >> 20)); | 1001 | (unsigned long)(total_mem >> 20)); |
1002 | 1002 | ||
1003 | /* The crashk resource must always be located in normal mem */ | ||
1003 | crashk_res.start = crash_base; | 1004 | crashk_res.start = crash_base; |
1004 | crashk_res.end = crash_base + crash_size - 1; | 1005 | crashk_res.end = crash_base + crash_size - 1; |
1005 | insert_resource(&iomem_resource, &crashk_res); | 1006 | insert_resource(&iomem_resource, &crashk_res); |
1007 | |||
1008 | if (arm_has_idmap_alias()) { | ||
1009 | /* | ||
1010 | * If we have a special RAM alias for use at boot, we | ||
1011 | * need to advertise to kexec tools where the alias is. | ||
1012 | */ | ||
1013 | static struct resource crashk_boot_res = { | ||
1014 | .name = "Crash kernel (boot alias)", | ||
1015 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM, | ||
1016 | }; | ||
1017 | |||
1018 | crashk_boot_res.start = phys_to_idmap(crash_base); | ||
1019 | crashk_boot_res.end = crashk_boot_res.start + crash_size - 1; | ||
1020 | insert_resource(&iomem_resource, &crashk_boot_res); | ||
1021 | } | ||
1006 | } | 1022 | } |
1007 | #else | 1023 | #else |
1008 | static inline void reserve_crashkernel(void) {} | 1024 | static inline void reserve_crashkernel(void) {} |