remove ARCH_SELECT_MEMORY_MODEL where it has no effect
Subsystems (5)
cover remove ARCH_SELECT_MEMORY_MODEL where it has no effect
Hi,
For several architectures the ARCH_SELECT_MEMORY_MODEL has no real effect because the dependencies for the memory model are always evaluated to a single value.
Remove the ARCH_SELECT_MEMORY_MODEL from the Kconfigs for these architectures.
Mike Rapoport (3):
arm: remove ARCH_SELECT_MEMORY_MODEL
s390: remove ARCH_SELECT_MEMORY_MODEL
sparc: remove ARCH_SELECT_MEMORY_MODEL
arch/arm/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sparc/Kconfig | 3 --- 3 files changed, 9 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 arm: remove ARCH_SELECT_MEMORY_MODEL
The ARCH_SELECT_MEMORY_MODEL in arch/arm/Kconfig is enabled only when ARCH_SPARSEMEM_ENABLE=y. But in this case, ARCH_SPARSEMEM_DEFAULT is also enabled and this in turn enables SPARSEMEM_MANUAL.
Since there is no definition of ARCH_FLATMEM_ENABLE in arch/arm/Kconfig, SPARSEMEM_MANUAL is the only enabled memory model, hence the final selection will evaluate to SPARSEMEM=y.
Since ARCH_SPARSEMEM_ENABLE is set to 'y' only by several sub-arch configurations, the default for must sub-arches would be the falback to FLATMEM regardless of ARCH_SELECT_MEMORY_MODEL.
--- arch/arm/Kconfig | 3 --- 1 file changed, 3 deletions(-)
arch/arm/Kconfig +0 -3
@@ -1592,9 +1592,6 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool ARCH_SPARSEMEM_ENABLE -config ARCH_SELECT_MEMORY_MODEL - def_bool ARCH_SPARSEMEM_ENABLE - config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
Signature · 1 line
2.7.4
PATCH 2/3 s390: remove ARCH_SELECT_MEMORY_MODEL
In reply to Mike RapoportThe only reason s390 has ARCH_SELECT_MEMORY_MODEL option in arch/s390/Kconfig is an ancient compile error with allnoconfig which was fixed by commit 97195d6b411f ("[S390] fix sparsemem related compile error with allnoconfig on s390") by adding the ARCH_SELECT_MEMORY_MODEL option.
Since then a lot have changed and now allnoconfig builds just fine without ARCH_SELECT_MEMORY_MODEL, so it can be removed.
--- arch/s390/Kconfig | 3 --- 1 file changed, 3 deletions(-)
arch/s390/Kconfig +0 -3
@@ -621,9 +621,6 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y -config ARCH_SELECT_MEMORY_MODEL - def_bool y - config ARCH_ENABLE_MEMORY_HOTPLUG def_bool y if SPARSEMEM
Signature · 1 line
2.7.4
Re: [PATCH 2/3] s390: remove ARCH_SELECT_MEMORY_MODEL
Quoted 5 lines · Mike Rapoport
The only reason s390 has
ARCH_SELECT_MEMORY_MODELoption inarch/s390/Kconfigis an ancient compile error with allnoconfig which was fixed by commit97195d6b411f("[S390] fix sparsemem related compile error with allnoconfig on s390") by adding theARCH_SELECT_MEMORY_MODELoption.
Quoted 7 lines
Since then a lot have changed and now allnoconfig builds just fine without
ARCH_SELECT_MEMORY_MODEL, so it can be removed.Signed-off-by Mike Rapoport <[email protected]>--- arch/s390/Kconfig | 3 --- 1 file changed, 3 deletions(-)
PATCH 3/3 sparc: remove ARCH_SELECT_MEMORY_MODEL
In reply to Mike RapoportThe ARCH_SELECT_MEMORY_MODEL option is enabled only for 64-bit. However, 64-bit configuration also enables ARCH_SPARSEMEM_DEFAULT and there is no ARCH_FLATMEM_ENABLE in arch/sparc/Kconfig.
With such settings, the dependencies in mm/Kconfig are always evaluated to SPARSEMEM=y for 64-bit and to FLATMEM=y for 32-bit.
The ARCH_SELECT_MEMORY_MODEL option in arch/sparc/Kconfig does not affect anything and can be removed.
--- arch/sparc/Kconfig | 3 --- 1 file changed, 3 deletions(-)
arch/sparc/Kconfig +0 -3
@@ -305,9 +305,6 @@ config NODES_SPAN_OTHER_NODES def_bool y depends on NEED_MULTIPLE_NODES -config ARCH_SELECT_MEMORY_MODEL - def_bool y if SPARC64 - config ARCH_SPARSEMEM_ENABLE def_bool y if SPARC64 select SPARSEMEM_VMEMMAP_ENABLE
Signature · 1 line
2.7.4
Andrew,
Can this go via the -mm tree?
Quoted 22 lines · Mike Rapoport
Hi,
For several architectures the
ARCH_SELECT_MEMORY_MODELhas no real effect because the dependencies for the memory model are always evaluated to a single value.Remove the
ARCH_SELECT_MEMORY_MODELfrom the Kconfigs for these architectures.Mike Rapoport (3):
arm: removeARCH_SELECT_MEMORY_MODEL
s390: removeARCH_SELECT_MEMORY_MODEL
sparc: removeARCH_SELECT_MEMORY_MODELarch/arm/Kconfig | 3 --- arch/s390/Kconfig | 3 --- arch/sparc/Kconfig | 3 --- 3 files changed, 9 deletions(-)Signature · 1 line
2.7.4
Signature · 2 lines
Sincerely yours, Mike.