Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Move kdump default base address to half RMO size on 64bit

We are seeing boot failures on some very large boxes even with
commit b5416ca9f824 (powerpc: Move kdump default base address to
64MB on 64bit).

This patch halves the RMO so both kernels get about the same
amount of RMO memory. On large machines this region will be
at least 256MB, so each kernel will get 128MB.

We cap it at 256MB (small SLB size) since some early allocations need
to be in the bolted SLB region. We could relax this on machines with
1TB SLBs in a future patch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
8aa6d359 b59a1bfc

+7 -13
-10
arch/powerpc/include/asm/kdump.h
··· 3 3 4 4 #include <asm/page.h> 5 5 6 - /* 7 - * If CONFIG_RELOCATABLE is enabled we can place the kdump kernel anywhere. 8 - * To keep enough space in the RMO for the first stage kernel on 64bit, we 9 - * place it at 64MB. If CONFIG_RELOCATABLE is not enabled we must place 10 - * the second stage at 32MB. 11 - */ 12 - #if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC64) 13 - #define KDUMP_KERNELBASE 0x4000000 14 - #else 15 6 #define KDUMP_KERNELBASE 0x2000000 16 - #endif 17 7 18 8 /* How many bytes to reserve at zero for kdump. The reserve limit should 19 9 * be greater or equal to the trampoline's end address.
+7 -3
arch/powerpc/kernel/machine_kexec.c
··· 136 136 crashk_res.start = KDUMP_KERNELBASE; 137 137 #else 138 138 if (!crashk_res.start) { 139 + #ifdef CONFIG_PPC64 139 140 /* 140 - * unspecified address, choose a region of specified size 141 - * can overlap with initrd (ignoring corruption when retained) 142 - * ppc64 requires kernel and some stacks to be in first segemnt 141 + * On 64bit we split the RMO in half but cap it at half of 142 + * a small SLB (128MB) since the crash kernel needs to place 143 + * itself and some stacks to be in the first segment. 143 144 */ 145 + crashk_res.start = min(0x80000000ULL, (ppc64_rma_size / 2)); 146 + #else 144 147 crashk_res.start = KDUMP_KERNELBASE; 148 + #endif 145 149 } 146 150 147 151 crash_base = PAGE_ALIGN(crashk_res.start);