From 0697e5e06ea0d96e2d1508104ff3b13e4dddc4bb Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Tue, 12 May 2020 18:11:19 +0100 Subject: ARM: 8974/1: use SPARSMEM_STATIC when SPARSEMEM is enabled The commit 3e347261a80b5 ("[PATCH] sparsemem extreme implementation") made SPARSMEM_EXTREME the default option for configurations that enable SPARSEMEM. For ARM systems with handful of memory banks SPARSEMEM_EXTREME is an overkill. Ensure that SPARSMEM_STATIC is enabled in the configurations that use SPARSEMEM. Fixes: 3e347261a80b5 ("[PATCH] sparsemem extreme implementation") Acked-by: Florian Fainelli Signed-off-by: Mike Rapoport Signed-off-by: Russell King --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 66a04f6f4775..c88a48d622fc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1517,6 +1517,7 @@ config ARCH_HAS_HOLES_MEMORYMODEL config ARCH_SPARSEMEM_ENABLE bool + select SPARSEMEM_STATIC config ARCH_SPARSEMEM_DEFAULT def_bool ARCH_SPARSEMEM_ENABLE -- cgit v1.2.3-59-g8ed1b From 98f3f7e51338db90f88940d99d9384a2855cc317 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Fri, 22 May 2020 15:09:56 +0100 Subject: ARM: 8979/1: Remove redundant ARCH_SPARSEMEM_DEFAULT setting If ARCH_SPARSEMEM_ENABLE=y and ARCH_{FLATMEM,DISCONTIGMEM}_ENABLE=n, then the logic in mm/Kconfig already makes CONFIG_SPARSEMEM the only choice. This is true for all of the existing ARM users of ARCH_SPARSEMEM_ENABLE. Forcing ARCH_SPARSEMEM_DEFAULT=y if ARCH_SPARSEMEM_ENABLE=y prevents us from ever defaulting to FLATMEM, so we should remove this setting. Link: https://lkml.org/lkml/2015/6/4/757 Signed-off-by: Kevin Cernekee Tested-by: Stephen Boyd Acked-by: Arnd Bergmann Signed-off-by: Gregory Fong Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Mike Rapoport Signed-off-by: Russell King --- arch/arm/Kconfig | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c88a48d622fc..604caf652e2a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1519,9 +1519,6 @@ config ARCH_SPARSEMEM_ENABLE bool select SPARSEMEM_STATIC -config ARCH_SPARSEMEM_DEFAULT - def_bool ARCH_SPARSEMEM_ENABLE - config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM -- cgit v1.2.3-59-g8ed1b From fb597f2a393294f3d3012ecb314f43b60fa48359 Mon Sep 17 00:00:00 2001 From: Gregory Fong Date: Fri, 22 May 2020 15:12:30 +0100 Subject: ARM: 8980/1: Allow either FLATMEM or SPARSEMEM on the multiplatform build ARMv7 chips with LPAE can often benefit from SPARSEMEM, as portions of system memory can be located deep in the 36-bit address space. Allow FLATMEM or SPARSEMEM to be selectable at compile time; FLATMEM remains the default. This is based on Kevin's "[PATCH 3/3] ARM: Allow either FLATMEM or SPARSEMEM on the multi-v7 build" from [1] and shamelessly rips off his commit message text above. As Arnd pointed out at [2] there doesn't seem to be any reason to tie this specifically to ARMv7, so this has been changed to apply to all multiplatform kernels. The addition of this option does not change the defaults and a build with any defconfig will behave the same way as previously. The only effect this change has is to enable user to change "Memory model" selection in interactive kernel configuration (menuconfig, xconfig etc). [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/286837.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/298950.html [ rppt: added ARCH_SELECT_MEMORY_MODEL and updated the changelog ] Cc: Kevin Cernekee Tested-by: Stephen Boyd Signed-off-by: Gregory Fong Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Mike Rapoport Signed-off-by: Russell King --- arch/arm/Kconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm/Kconfig') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 604caf652e2a..34b93e0903df 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -312,6 +312,9 @@ choice config ARCH_MULTIPLATFORM bool "Allow multiple platforms to be selected" depends on MMU + select ARCH_FLATMEM_ENABLE + select ARCH_SPARSEMEM_ENABLE + select ARCH_SELECT_MEMORY_MODEL select ARM_HAS_SG_CHAIN select ARM_PATCH_PHYS_VIRT select AUTO_ZRELADDR @@ -1515,9 +1518,15 @@ config OABI_COMPAT config ARCH_HAS_HOLES_MEMORYMODEL bool +config ARCH_SELECT_MEMORY_MODEL + bool + +config ARCH_FLATMEM_ENABLE + bool + config ARCH_SPARSEMEM_ENABLE bool - select SPARSEMEM_STATIC + select SPARSEMEM_STATIC if SPARSEMEM config HAVE_ARCH_PFN_VALID def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM -- cgit v1.2.3-59-g8ed1b