Skip to contentSkip to conversation

PPC32 memory models

PATCH New Andy Whitcroft 2 participants 3 messages Nov 28, 2005 – Nov 29, 2005 PowerPC

lore
Share & tools
lore
#0 lore raw

It seems that there is some confusion over what we should be supporting memory model wise for PPC32 under powerpc architecture. The current Kconfig limits you to only SPARSEMEM which isn't parameterised for PPC32 at all. Are we expecting to be able to support PPC32 as yet in this architecture? If so it seems we have a couple of issues with the Kconfig.

Attached is a patch to enable FLATMEM and disable SPARSEMEM for PPC32 which seems to be the working combinations. It may well not be what is intended. But I offer it to start discussions.

Comments.

-apw

powerpc: ppc32 clean up available memory models

Clean up the currently available memory models for ppc32. It seems that we do need FLATMEM for ppc32 on non-NUMA. It also seems that SPARSEMEM is not parameterised yet so disable that.

---

arch/powerpc/Kconfig +3 -2
diff -upN reference/arch/powerpc/Kconfig current/arch/powerpc/Kconfig
@@ -584,14 +584,15 @@ config ARCH_SELECT_MEMORY_MODEL
 
 config ARCH_FLATMEM_ENABLE
        def_bool y
-       depends on PPC64 && !NUMA
+       depends on !NUMA
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
+	depends on PPC64
 
 config ARCH_SPARSEMEM_DEFAULT
 	def_bool y
-	depends on SMP && PPC_PSERIES
+	depends on SMP && PPC_PSERIES && NUMA
 
 source "mm/Kconfig"
 
#1 lore raw
Quoted 3 lines · Andy Whitcroft

Attached is a patch to enable FLATMEM and disable SPARSEMEM for PPC32 which seems to be the working combinations. It may well not be what is intended. But I offer it to start discussions.

Sounds right.

arch/powerpc/Kconfig config ARCH_SELECT_MEMORY_MODEL · line 595

Quoted 4 lines

config ARCH_SPARSEMEM_DEFAULT

arch/powerpc/Kconfig +1 -1
 	def_bool y
-	depends on SMP && PPC_PSERIES
+	depends on SMP && PPC_PSERIES && NUMA

Shouldn't this depend on ARCH_SPARSEMEM_ENABLE?

Paul.

#2 lore raw

PATCH 1/1 powerpc ppc32 clean up available memory models

In reply to Andy Whitcroft

Ok, attempt #2 at cleaning up the memory models for powerpc/ppc32. Made it very explicit which combinations require FLATMEM and left the defaults alone for SPARSEMEM. Seems to do what I expect.

Comments.

-apw

=== 8< ===
powerpc: ppc32 clean up available memory models

Clean up the currently available memory models for ppc32 under the powerpc architecture. We need FLATMEM for ppc32 enable it. SPARSEMEM is not parameterised for ppc32 so disable that. Take this opportunity to clean up white space for FLATMEM_ENABLE.

Against 2.6.15-rc3 with Anton's flatmem disable patch.

---

arch/powerpc/Kconfig +3 -2
diff -upN reference/arch/powerpc/Kconfig current/arch/powerpc/Kconfig
@@ -578,11 +578,12 @@ config ARCH_SELECT_MEMORY_MODEL
 	depends on PPC64
 
 config ARCH_FLATMEM_ENABLE
-       def_bool y
-       depends on PPC64 && !NUMA
+	def_bool y
+	depends on (PPC64 && !NUMA) || PPC32
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
+	depends on PPC64
 
 config ARCH_SPARSEMEM_DEFAULT
 	def_bool y