Skip to content

Commit f7f0b7d

Browse files
Russell Kingtorvalds
authored andcommitted
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>
1 parent 4caf961 commit f7f0b7d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎arch/arm/kernel/setup.c‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,25 @@ static void __init reserve_crashkernel(void)
10001000
(unsigned long)(crash_base >> 20),
10011001
(unsigned long)(total_mem >> 20));
10021002

1003+
/* The crashk resource must always be located in normal mem */
10031004
crashk_res.start = crash_base;
10041005
crashk_res.end = crash_base + crash_size - 1;
10051006
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+
}
10061022
}
10071023
#else
10081024
static inline void reserve_crashkernel(void) {}

0 commit comments

Comments
 (0)