ARM: kexec: remove 512MB restriction on kexec crashdump
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 1 Apr 2016 13:47:36 +0000 (14:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 3 May 2016 10:15:51 +0000 (11:15 +0100)
The real limit is the top of the visible physical address space with
the MMU turned off.  Hence, we need to limit the crash kernel allocation
running-view physical address of the top of the boot-view physical
address space.

Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/setup.c

index 77b54c4..d9317ee 100644 (file)
@@ -943,7 +943,6 @@ late_initcall(init_machine_late);
  * zImage relocating below the reserved region.
  */
 #define CRASH_ALIGN    (128 << 20)
-#define CRASH_ADDR_MAX (PHYS_OFFSET + (512 << 20))
 
 static inline unsigned long long get_total_mem(void)
 {
@@ -973,9 +972,7 @@ static void __init reserve_crashkernel(void)
                return;
 
        if (crash_base <= 0) {
-               unsigned long long crash_max = CRASH_ADDR_MAX;
-               if (crash_max > (u32)~0)
-                       crash_max = (u32)~0;
+               unsigned long long crash_max = idmap_to_phys((u32)~0);
                crash_base = memblock_find_in_range(CRASH_ALIGN, crash_max,
                                                    crash_size, CRASH_ALIGN);
                if (!crash_base) {