Skip to content

Commit 64fdcbc

Browse files
committed
powerpc/prom: Fix 32-bit build
Add an IS_ENABLED() check to fix the build error: arch/powerpc/kernel/prom.o: in function `early_init_dt_scan_cpus': prom.c:(.init.text+0x2ea): undefined reference to `boot_cpu_node_count' Fixes: e13d23a ("powerpc: export the CPU node count") Signed-off-by: Michael Ellerman <[email protected]>
1 parent 98c738c commit 64fdcbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/kernel/prom.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
336336
if (type == NULL || strcmp(type, "cpu") != 0)
337337
return 0;
338338

339-
boot_cpu_node_count++;
339+
if (IS_ENABLED(CONFIG_PPC64))
340+
boot_cpu_node_count++;
340341

341342
/* Get physical cpuid */
342343
intserv = of_get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s", &len);

0 commit comments

Comments
 (0)