[PATCH 4/6] powerpc: numa: Restrict fake NUMA enulation to CONFIG_NUMA systems
From: Jonathan NeuschÃfer
Date: Tue Feb 20 2018 - 11:17:12 EST
Signed-off-by: Jonathan NeuschÃfer <j.neuschaefer@xxxxxxx>
---
arch/powerpc/mm/numa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index df03a65b658f..dfe279529463 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -738,7 +738,8 @@ static void __init setup_nonnuma(void)
start_pfn = memblock_region_memory_base_pfn(reg);
end_pfn = memblock_region_memory_end_pfn(reg);
- fake_numa_create_new_node(end_pfn, &nid);
+ if (IS_ENABLED(CONFIG_NUMA))
+ fake_numa_create_new_node(end_pfn, &nid);
memblock_set_node(PFN_PHYS(start_pfn),
PFN_PHYS(end_pfn - start_pfn),
&memblock.memory, nid);
--
2.16.1