ARM: kexec: avoid allocating crashkernel region outside lowmem
[sfrench/cifs-2.6.git] / arch / arm / kernel / setup.c
index 4e80bf7420d4e65fb30e0c68e7bef53932f765b3..8e9a3e40d949567598cfdcc8146823f5ada96cb2 100644 (file)
@@ -987,6 +987,9 @@ static void __init reserve_crashkernel(void)
 
        if (crash_base <= 0) {
                unsigned long long crash_max = idmap_to_phys((u32)~0);
+               unsigned long long lowmem_max = __pa(high_memory - 1) + 1;
+               if (crash_max > lowmem_max)
+                       crash_max = lowmem_max;
                crash_base = memblock_find_in_range(CRASH_ALIGN, crash_max,
                                                    crash_size, CRASH_ALIGN);
                if (!crash_base) {