linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Stephen Boyd <sboyd@kernel.org>,
	Kevin Cernekee <cernekee@gmail.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Doug Berger <opendmb@gmail.com>,
	Gregory Fong <gregory.0xf0@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build
Date: Thu, 21 May 2020 11:18:25 +0300	[thread overview]
Message-ID: <20200521081825.1348844-3-rppt@linux.ibm.com> (raw)
In-Reply-To: <20200521081825.1348844-1-rppt@linux.ibm.com>

From: Gregory Fong <gregory.0xf0@gmail.com>

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 update the changelog ]

Cc: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 arch/arm/Kconfig | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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
-- 
2.26.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-05-21  8:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21  8:18 [PATCH 0/2] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build Mike Rapoport
2020-05-21  8:18 ` [PATCH 1/2] ARM: Remove redundant ARCH_SPARSEMEM_DEFAULT setting Mike Rapoport
2020-05-21  8:18 ` Mike Rapoport [this message]
2020-05-21 12:03 ` [PATCH 0/2] ARM: Allow either FLATMEM or SPARSEMEM on the multiplatform build Russell King - ARM Linux admin
2020-05-21 12:33   ` Mike Rapoport
2020-05-21 14:07     ` Mike Rapoport
2020-05-21 14:50       ` Russell King - ARM Linux admin
2020-05-21 15:56         ` Mike Rapoport
2020-06-02 12:18         ` Geert Uytterhoeven
2020-06-02 12:22           ` Russell King - ARM Linux admin
2020-06-02 12:37             ` Geert Uytterhoeven
2020-06-02 12:56               ` Russell King - ARM Linux admin
2020-05-26 11:18 ` Russell King - ARM Linux admin
2020-05-26 11:42   ` Mike Rapoport
2020-05-26 11:46     ` Russell King - ARM Linux admin
  -- strict thread matches above, loose matches on Subject: below --
2020-05-06 23:50 [PATCH 0/2] " Florian Fainelli
2020-05-06 23:50 ` [PATCH 2/2] ARM: " Florian Fainelli
2020-05-07  7:27   ` Mike Rapoport
2020-05-07 20:11     ` Florian Fainelli
2020-05-18 15:58       ` Florian Fainelli
2020-05-18 19:45         ` Mike Rapoport
2020-05-19  7:59           ` Arnd Bergmann
2020-05-19 14:43             ` Mike Rapoport
2020-05-19 15:04               ` Russell King - ARM Linux admin
2020-05-19 15:27                 ` Mike Rapoport
2020-05-19 15:32                   ` Arnd Bergmann
2020-05-19 16:54                     ` Russell King - ARM Linux admin
2020-05-19 17:59                       ` Mike Rapoport
2020-05-19 20:42                       ` Arnd Bergmann
2020-05-21  2:45                         ` Florian Fainelli
2020-05-21  7:47                           ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200521081825.1348844-3-rppt@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=cernekee@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=opendmb@gmail.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).