From: Eric W. Biederman Date: Sat, 6 Aug 2005 19:47:36 +0000 (-0600) Subject: [PATCH] x86_64 bootmem: sparse_mem/kexec merge bug. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d317fb72fe3cf0f611608cf3a3015bbe6cd2a66;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] x86_64 bootmem: sparse_mem/kexec merge bug. When the sparse mem changes and the kexec changes were merged into setup.c they came in, in the wrong order. This patch changes the order so we don't run sparse_init which uses the bootmem allocator until we all of the reserve_bootmem calls has been made. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0aa526298e9..116a491e296 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -645,15 +645,15 @@ void __init setup_arch(char **cmdline_p) } } #endif - - sparse_init(); - #ifdef CONFIG_KEXEC if (crashk_res.start != crashk_res.end) { reserve_bootmem(crashk_res.start, crashk_res.end - crashk_res.start + 1); } #endif + + sparse_init(); + paging_init(); check_ioapic();