powerpc: Make cpu_to_chip_id() available when SMP=n
Up until now we have only used cpu_to_chip_id() in the topology code, which is only used on SMP builds. However my recent commit a4da0d50 "Implement arch_get_random_long/int() for powernv" added a usage when SMP=n, breaking the build. Move cpu_to_chip_id() into prom.c so it is available for SMP=n builds. We would move the extern to prom.h, but that breaks the include in topology.h. Instead we leave it in smp.h, but move it out of the CONFIG_SMP #ifdef. We also need to include asm/smp.h in rng.c, because the linux version skips asm/smp.h on UP. What a mess. Signed-off-by:Michael Ellerman <mpe@ellerman.id.au> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing
- arch/powerpc/include/asm/smp.h 1 addition, 1 deletionarch/powerpc/include/asm/smp.h
- arch/powerpc/kernel/prom.c 20 additions, 0 deletionsarch/powerpc/kernel/prom.c
- arch/powerpc/kernel/smp.c 0 additions, 16 deletionsarch/powerpc/kernel/smp.c
- arch/powerpc/platforms/powernv/rng.c 1 addition, 0 deletionsarch/powerpc/platforms/powernv/rng.c
Loading
Please register or sign in to comment