Skip to contentSkip to conversation

powerpc: Fix build failure when MEMORY_HOTPLUG=y

PATCH In review Pranith Kumar 3 participants 4 messages Aug 19, 2014 – Sep 25, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix build failure when MEMORY_HOTPLUG=y

ARCH_ENABLE_MEMORY_HOTPLUG is enabled by default for powerpc. This causes build failures when SPARSEMEM=n as memory hotplug needs definition which are defined only when SPARSEMEM=y. The error is as follows:

arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: error: 'SECTION_SIZE_BITS' undeclared (first use in this function) arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: note: each undeclared identifier is reported only once for each function it appears in arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
arch/powerpc/platforms/pseries/hotplug-memory.c:98:34: error: 'SECTION_SIZE_BITS' undeclared (first use in this function) make[2]: *** [arch/powerpc/platforms/pseries/hotplug-memory.o] Error 1

---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/Kconfig +1 -0
index 9c1aa77..da16ffe 100644
@@ -383,6 +383,7 @@ config ARCH_CPU_PROBE_RELEASE
 
 config ARCH_ENABLE_MEMORY_HOTPLUG
 	def_bool y
+	depends on SPARSEMEM
 
 config ARCH_HAS_WALK_MEMORY
 	def_bool y
Signature · 1 line
1.9.1
#1 lore raw
Quoted 29 lines · Pranith Kumar

ARCH_ENABLE_MEMORY_HOTPLUG is enabled by default for powerpc. This causes build failures when SPARSEMEM=n as memory hotplug needs definition which are defined only when SPARSEMEM=y. The error is as follows:

arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: error: 'SECTION_SIZE_BITS' undeclared (first use in this function) arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: note: each undeclared identifier is reported only once for each function it appears in arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
arch/powerpc/platforms/pseries/hotplug-memory.c:98:34: error: 'SECTION_SIZE_BITS' undeclared (first use in this function) make[2]: *** [arch/powerpc/platforms/pseries/hotplug-memory.o] Error 1

---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/Kconfig +1 -1
index 9c1aa77..da16ffe 100644
@@ -383,6 +383,7 @@ config ARCH_CPU_PROBE_RELEASE
 
 config ARCH_ENABLE_MEMORY_HOTPLUG
        def_bool y
+       depends on SPARSEMEM
 
 config ARCH_HAS_WALK_MEMORY
        def_bool y
--
Quoted 1 line

1.9.1

In light of my investigation for your spufs patch, I guess this is a non-SMP PSERIES config?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line

1.9.1

In light of my investigation for your spufs patch, I guess this is a non-SMP PSERIES config?

So what happens is SELECT_MEMORY_MODEL choses FLATMEM_MANUAL because of which SPARSEMEM is not enabled despite having ARCH_SPARSEMEM_ENABLE=y.

Signature · 1 line
Pranith
#3 lore raw
In reply to Pranith Kumar
Quoted 6 lines · Pranith Kumar

ARCH_ENABLE_MEMORY_HOTPLUG is enabled by default for powerpc. This causes build failures when SPARSEMEM=n as memory hotplug needs definition which are defined only when SPARSEMEM=y. The error is as follows:

arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: error: 'SECTION_SIZE_BITS' undeclared (first use in this function) arch/powerpc/platforms/pseries/hotplug-memory.c:27:31: note: each undeclared identifier is reported only once for each function it appears in

I don't see how you can even build pseries without SPARSEMEM=y ?

The three options are:

default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT default FLATMEM_MANUAL

We don't have DISCONTIGMEM.

FLATMEM_MANUAL depends on !ARCH_SPARSEMEM_ENABLE.

We turn on ARCH_SPARSEMEM_ENABLE, and it's not user editable.

cheers