]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Fix build break for SPLPAR=n and CPU hotplug
authorGuenter Roeck <linux@roeck-us.net>
Mon, 12 Feb 2018 22:34:08 +0000 (14:34 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Feb 2018 11:38:39 +0000 (22:38 +1100)
commitc0b6bb92441f1524222d7742a47e37a2fcc2d926
tree699f063393703274bf444e301349c03152eebe74
parent2b6fb26e902d9317c588b0d2fa8e3d11605425c2
powerpc/pseries: Fix build break for SPLPAR=n and CPU hotplug

Commit 9a32b2065e85 ("powerpc/pseries: Fix cpu hotplug crash with
memoryless nodes") adds an unconditional call to
find_and_online_cpu_nid(), which is only declared if CONFIG_PPC_SPLPAR
is enabled. This results in the following build error if this is not
the case.

  arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_online_cpu':
  arch/powerpc/platforms/pseries/hotplug-cpu.c:369:
   undefined reference to `.find_and_online_cpu_nid'

Follow the guideline provided by similar functions and provide a dummy
function if CONFIG_PPC_SPLPAR is not enabled. This also moves the
external function declaration into an include file where it should be.

Fixes: 9a32b2065e85 ("powerpc/pseries: Fix cpu hotplug crash with memoryless nodes")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[mpe: Change subject to emphasise the build fix]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/topology.h
arch/powerpc/platforms/pseries/hotplug-cpu.c