aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-01-11 01:44:50 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 01:44:50 -0800
commit6ac5fff12d352674c5b67e1823592957af92a4cd (patch)
treea5b4b3993cf3aac0cef4a30a232c22c1788b751f /arch
parent3d311cb2e0c88fa555aff6ce67635028241b7440 (diff)
downloadhistory-6ac5fff12d352674c5b67e1823592957af92a4cd.tar.gz
[PATCH] ppc64: Make NUMA code handle unexpected layouts
From: Nathan Lynch <nathanl@austin.ibm.com> Ran into this on a 4GB partition - all but about ~300MB was thrown away. It works for me, but I've not tested on firmware without the bug. Fall back to non-numa setup upon discovering unexpected memory layout as presented by firmware, instead of throwing away regions. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Acked-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/mm/numa.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c
index ad07e3d0d3445e..83d7ec3b7c104e 100644
--- a/arch/ppc64/mm/numa.c
+++ b/arch/ppc64/mm/numa.c
@@ -345,8 +345,6 @@ new_range:
numa_domain = 0;
}
- node_set_online(numa_domain);
-
if (max_domain < numa_domain)
max_domain = numa_domain;
@@ -361,14 +359,19 @@ new_range:
init_node_data[numa_domain].node_start_pfn +
init_node_data[numa_domain].node_spanned_pages;
if (shouldstart != (start / PAGE_SIZE)) {
- printk(KERN_ERR "WARNING: Hole in node, "
- "disabling region start %lx "
- "length %lx\n", start, size);
- continue;
+ /* Revert to non-numa for now */
+ printk(KERN_ERR
+ "WARNING: Unexpected node layout: "
+ "region start %lx length %lx\n",
+ start, size);
+ printk(KERN_ERR "NUMA is disabled\n");
+ goto err;
}
init_node_data[numa_domain].node_spanned_pages +=
size / PAGE_SIZE;
} else {
+ node_set_online(numa_domain);
+
init_node_data[numa_domain].node_start_pfn =
start / PAGE_SIZE;
init_node_data[numa_domain].node_spanned_pages =
@@ -388,6 +391,14 @@ new_range:
node_set_online(i);
return 0;
+err:
+ /* Something has gone wrong; revert any setup we've done */
+ for_each_node(i) {
+ node_set_offline(i);
+ init_node_data[i].node_start_pfn = 0;
+ init_node_data[i].node_spanned_pages = 0;
+ }
+ return -1;
}
static void __init setup_nonnuma(void)