summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/mm/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/mm/numa.c')
-rw-r--r--arch/ppc64/mm/numa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c
index cafd91aef289..0b191f2de016 100644
--- a/arch/ppc64/mm/numa.c
+++ b/arch/ppc64/mm/numa.c
@@ -647,7 +647,12 @@ void __init do_init_bootmem(void)
new_range:
mem_start = read_n_cells(addr_cells, &memcell_buf);
mem_size = read_n_cells(size_cells, &memcell_buf);
- numa_domain = numa_enabled ? of_node_numa_domain(memory) : 0;
+ if (numa_enabled) {
+ numa_domain = of_node_numa_domain(memory);
+ if (numa_domain >= MAX_NUMNODES)
+ numa_domain = 0;
+ } else
+ numa_domain = 0;
if (numa_domain != nid)
continue;
OpenPOWER on IntegriCloud