diff mbox series

powerpc/pseries: Fix CONFIG_NUMA=n build

Message ID 20180509145818.17254-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 6c0a8f6b5a45ac892a763b6299bd3c5324fc5e02
Headers show
Series powerpc/pseries: Fix CONFIG_NUMA=n build | expand

Commit Message

Michael Ellerman May 9, 2018, 2:58 p.m. UTC
The build is failing with CONFIG_NUMA=n and some compiler versions:

  arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_online_cpu':
  hotplug-cpu.c:(.text+0x12c): undefined reference to `timed_topology_update'
  arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_cpu_remove':
  hotplug-cpu.c:(.text+0x400): undefined reference to `timed_topology_update'

Fix it by moving the empty version of timed_topology_update() into the
existing #ifdef block, which has the right guard of SPLPAR && NUMA.

Fixes: cee5405da402 ("powerpc/hotplug: Improve responsiveness of hotplug change")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/topology.h | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Michael Ellerman May 10, 2018, 4:06 a.m. UTC | #1
On Wed, 2018-05-09 at 14:58:18 UTC, Michael Ellerman wrote:
> The build is failing with CONFIG_NUMA=n and some compiler versions:
> 
>   arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_online_cpu':
>   hotplug-cpu.c:(.text+0x12c): undefined reference to `timed_topology_update'
>   arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_cpu_remove':
>   hotplug-cpu.c:(.text+0x400): undefined reference to `timed_topology_update'
> 
> Fix it by moving the empty version of timed_topology_update() into the
> existing #ifdef block, which has the right guard of SPLPAR && NUMA.
> 
> Fixes: cee5405da402 ("powerpc/hotplug: Improve responsiveness of hotplug change")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/6c0a8f6b5a45ac892a763b6299bd3c

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 9f421641a35c..16b077801a5f 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -91,6 +91,7 @@  extern int start_topology_update(void);
 extern int stop_topology_update(void);
 extern int prrn_is_enabled(void);
 extern int find_and_online_cpu_nid(int cpu);
+extern int timed_topology_update(int nsecs);
 #else
 static inline int start_topology_update(void)
 {
@@ -108,16 +109,12 @@  static inline int find_and_online_cpu_nid(int cpu)
 {
 	return 0;
 }
+static inline int timed_topology_update(int nsecs)
+{
+	return 0;
+}
 #endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */
 
-#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_NEED_MULTIPLE_NODES)
-#if defined(CONFIG_PPC_SPLPAR)
-extern int timed_topology_update(int nsecs);
-#else
-#define	timed_topology_update(nsecs)
-#endif /* CONFIG_PPC_SPLPAR */
-#endif /* CONFIG_HOTPLUG_CPU || CONFIG_NEED_MULTIPLE_NODES */
-
 #include <asm-generic/topology.h>
 
 #ifdef CONFIG_SMP