The patch titled Subject: ARM: kexec: advertise location of bootable RAM has been added to the -mm tree. Its filename is arm-kexec-advertise-location-of-bootable-ram.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/arm-kexec-advertise-location-of-bootable-ram.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/arm-kexec-advertise-location-of-bootable-ram.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> Subject: ARM: kexec: advertise location of bootable RAM Advertise the location of bootable RAM to kexec-tools. kexec needs to know where it can place the kernel in RAM, and so be executable when the system needs to jump into it. Advertise these areas in /proc/iomem with a "System RAM (boot alias)" tag. Link: http://lkml.kernel.org/r/E1b8ko4-0004HA-GF@xxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> Reviewed-by: Pratyush Anand <panand@xxxxxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Keerthy <j-keerthy@xxxxxx> Cc: Vitaly Andrianov <vitalya@xxxxxx> Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx> Cc: Dave Young <dyoung@xxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Cc: Simon Horman <horms@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm/kernel/setup.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff -puN arch/arm/kernel/setup.c~arm-kexec-advertise-location-of-bootable-ram arch/arm/kernel/setup.c --- a/arch/arm/kernel/setup.c~arm-kexec-advertise-location-of-bootable-ram +++ a/arch/arm/kernel/setup.c @@ -849,10 +849,29 @@ static void __init request_standard_reso kernel_data.end = virt_to_phys(_end - 1); for_each_memblock(memory, region) { + phys_addr_t start = __pfn_to_phys(memblock_region_memory_base_pfn(region)); + phys_addr_t end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1; + unsigned long boot_alias_start; + + /* + * Some systems have a special memory alias which is only + * used for booting. We need to advertise this region to + * kexec-tools so they know where bootable RAM is located. + */ + boot_alias_start = phys_to_idmap(start); + if (arm_has_idmap_alias() && boot_alias_start != IDMAP_INVALID_ADDR) { + res = memblock_virt_alloc(sizeof(*res), 0); + res->name = "System RAM (boot alias)"; + res->start = boot_alias_start; + res->end = phys_to_idmap(end); + res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + request_resource(&iomem_resource, res); + } + res = memblock_virt_alloc(sizeof(*res), 0); res->name = "System RAM"; - res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region)); - res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1; + res->start = start; + res->end = end; res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY; request_resource(&iomem_resource, res); _ Patches currently in -mm which might be from rmk+kernel@xxxxxxxxxxxxxxxx are arm-kdump-advertise-boot-aliased-crash-kernel-resource.patch arm-kexec-advertise-location-of-bootable-ram.patch kexec-dont-invoke-oom-killer-for-control-page-allocation.patch kexec-ensure-user-memory-sizes-do-not-wrap.patch kdump-arrange-for-paddr_vmcoreinfo_note-to-return-phys_addr_t.patch kexec-allow-architectures-to-override-boot-mapping.patch arm-kexec-fix-kexec-for-keystone-2.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html