aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2013-11-12 18:08:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:08 -0500
commitfa591c4ae76ecbd4d26d7e8f65429d6d454554a6 (patch)
treeb9384b4b86ebbb413b0dcee55667b81e202ba588 /arch/x86/kernel
parentb959ed6c73845aebf51afb8f76bb74b9388344d2 (diff)
x86, acpi, crash, kdump: do reserve_crashkernel() after SRAT is parsed.
Memory reserved for crashkernel could be large. So we should not allocate this memory bottom up from the end of kernel image. When SRAT is parsed, we will be able to know which memory is hotpluggable, and we can avoid allocating this memory for the kernel. So reorder reserve_crashkernel() after SRAT is parsed. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Toshi Kani <toshi.kani@hp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Taku Izumi <izumi.taku@jp.fujitsu.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 918d489fa53d..cb233bc9dee3 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1121,8 +1121,6 @@ void __init setup_arch(char **cmdline_p)
1121 acpi_initrd_override((void *)initrd_start, initrd_end - initrd_start); 1121 acpi_initrd_override((void *)initrd_start, initrd_end - initrd_start);
1122#endif 1122#endif
1123 1123
1124 reserve_crashkernel();
1125
1126 vsmp_init(); 1124 vsmp_init();
1127 1125
1128 io_delay_init(); 1126 io_delay_init();
@@ -1135,6 +1133,13 @@ void __init setup_arch(char **cmdline_p)
1135 early_acpi_boot_init(); 1133 early_acpi_boot_init();
1136 1134
1137 initmem_init(); 1135 initmem_init();
1136
1137 /*
1138 * Reserve memory for crash kernel after SRAT is parsed so that it
1139 * won't consume hotpluggable memory.
1140 */
1141 reserve_crashkernel();
1142
1138 memblock_find_dma_reserve(); 1143 memblock_find_dma_reserve();
1139 1144
1140#ifdef CONFIG_KVM_GUEST 1145#ifdef CONFIG_KVM_GUEST