aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
diff options
context:
space:
mode:
authorkeith mannthey <kmannth@us.ibm.com>2006-10-21 12:37:01 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-10-21 12:37:01 -0400
commit926fafebc48a3218fac675f12974f9a46473bd40 (patch)
tree6a4f742c5304a2abc627e6f4da3459e742eb42ea /arch/x86_64/mm
parent13892de19eb9007ea47430c701bdbf69df71d883 (diff)
[PATCH] x86-64: x86_64 hot-add memory srat.c fix
This patch corrects the logic used in srat.c to figure out what parsing what action to take when registering hot-add areas. Hot-add areas should only be added to the node information for the MEMORY_HOTPLUG_RESERVE case. When booting MEMORY_HOTPLUG_SPARSE hot-add areas on everything but the last node are getting include in the node data and during kernel boot the pages are setup then the kernel dies when the pages are used. This patch fixes this issue. Signed-off-by: Keith Mannthey <kmannth@us.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/srat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
index 3cc0544e25f..1087e150a21 100644
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -207,7 +207,7 @@ static inline int save_add_info(void)
207 return hotadd_percent > 0; 207 return hotadd_percent > 0;
208} 208}
209#else 209#else
210int update_end_of_memory(unsigned long end) {return 0;} 210int update_end_of_memory(unsigned long end) {return -1;}
211static int hotadd_enough_memory(struct bootnode *nd) {return 1;} 211static int hotadd_enough_memory(struct bootnode *nd) {return 1;}
212#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE 212#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
213static inline int save_add_info(void) {return 1;} 213static inline int save_add_info(void) {return 1;}
@@ -337,7 +337,7 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma)
337 push_node_boundaries(node, nd->start >> PAGE_SHIFT, 337 push_node_boundaries(node, nd->start >> PAGE_SHIFT,
338 nd->end >> PAGE_SHIFT); 338 nd->end >> PAGE_SHIFT);
339 339
340 if (ma->flags.hot_pluggable && !reserve_hotadd(node, start, end) < 0) { 340 if (ma->flags.hot_pluggable && (reserve_hotadd(node, start, end) < 0)) {
341 /* Ignore hotadd region. Undo damage */ 341 /* Ignore hotadd region. Undo damage */
342 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n"); 342 printk(KERN_NOTICE "SRAT: Hotplug region ignored\n");
343 *nd = oldnode; 343 *nd = oldnode;