[PATCH] powerpc: Fix build failure when MEMORY_HOTPLUG=y

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE4336d

4 messages, 3 authors, 2014-09-25 · open the first message on its own page

[PATCH] powerpc: Fix build failure when MEMORY_HOTPLUG=y

From: Pranith Kumar <hidden>
Date: 2014-08-19 21:01:07

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

Signed-off-by: Pranith Kumar <redacted>
CC: Andew Morton <akpm@linux-foundation.org>
---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9c1aa77..da16ffe 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -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
-- 
1.9.1

Re: [PATCH] powerpc: Fix build failure when MEMORY_HOTPLUG=y

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2014-08-20 08:00:53

On Tue, Aug 19, 2014 at 11:01 PM, Pranith Kumar [off-list ref] wrote:
quoted hunk
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

Signed-off-by: Pranith Kumar <redacted>
CC: Andew Morton <akpm@linux-foundation.org>
---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9c1aa77..da16ffe 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -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
--
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 -- geert@linux-m68k.org

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

Re: [PATCH] powerpc: Fix build failure when MEMORY_HOTPLUG=y

From: Pranith Kumar <hidden>
Date: 2014-08-20 13:12:41

On Wed, Aug 20, 2014 at 4:00 AM, Geert Uytterhoeven
[off-list ref] wrote:
quoted
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.

-- 
Pranith

Re: powerpc: Fix build failure when MEMORY_HOTPLUG=y

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2014-09-25 01:14:12

On Tue, 2014-19-08 at 21:01:05 UTC, Pranith Kumar wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help