]> Git Repo - linux.git/commitdiff
ARM: 8980/1: Allow either FLATMEM or SPARSEMEM on the multiplatform build
authorGregory Fong <[email protected]>
Fri, 22 May 2020 14:12:30 +0000 (15:12 +0100)
committerRussell King <[email protected]>
Tue, 26 May 2020 11:46:51 +0000 (12:46 +0100)
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 <[email protected]>
Tested-by: Stephen Boyd <[email protected]>
Signed-off-by: Gregory Fong <[email protected]>
Signed-off-by: Doug Berger <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Russell King <[email protected]>
arch/arm/Kconfig

index 604caf652e2a172c255fabf4cd95eeb9a473c0c3..34b93e0903df71216a436ec039122cd945f82298 100644 (file)
@@ -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
This page took 0.066957 seconds and 4 git commands to generate.