Skip to contentSkip to conversation

x86/Kconfig: select ARCH_SELECT_MEMORY_MODEL only if FLATMEM and SPARSEMEM are possible

PATCH Applied David Hildenbrand 2 participants 2 messages Sep 29, 2021 – Jan 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/Kconfig: select ARCH_SELECT_MEMORY_MODEL only if FLATMEM and SPARSEMEM are possible

On x86-64 we really only support CONFIG_SPARSEMEM; there is nothing users can select. So enable the memory model selection (via CONFIG_ARCH_SELECT_MEMORY_MODEL) only if both, SPARSEMEM and FLATMEM are possible, which isn't the case on x86-64.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
index ab83c22d274e..50f98dc02ad4 100644
@@ -1611,7 +1611,7 @@ config ARCH_SPARSEMEM_DEFAULT
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
-	depends on ARCH_SPARSEMEM_ENABLE
+	depends on ARCH_SPARSEMEM_ENABLE && ARCH_FLATMEM_ENABLE
 
 config ARCH_MEMORY_PROBE
 	bool "Enable sysfs memory/probe interface"
Signature · 1 line
2.31.1
#1 lore raw

[tip: x86/build] x86/Kconfig: Select ARCH_SELECT_MEMORY_MODEL only if FLATMEM and SPARSEMEM are possible

The following commit has been merged into the x86/build branch of tip:

The following commit has been merged into the x86/build branch of tip:

Commit-ID:     4eda2bc3431ebe5c8361580877a4666d10ea28a7
Gitweb:        https://git.kernel.org/tip/4eda2bc3431ebe5c8361580877a4666d10ea28a7
Author:        David Hildenbrand <[email protected]>
AuthorDate:    Wed, 29 Sep 2021 16:43:21 +02:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Sun, 23 Jan 2022 20:52:16 +01:00

x86/Kconfig: Select ARCH_SELECT_MEMORY_MODEL only if FLATMEM and SPARSEMEM are possible

x86-64 supports only CONFIG_SPARSEMEM; there is nothing users can select. So enable the memory model selection (via CONFIG_ARCH_SELECT_MEMORY_MODEL) only if both, SPARSEMEM and FLATMEM are possible, which isn't the case on x86-64.

---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
index ebe8fc7..a7e0bf4 100644
@@ -1637,7 +1637,7 @@ config ARCH_SPARSEMEM_DEFAULT
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
-	depends on ARCH_SPARSEMEM_ENABLE
+	depends on ARCH_SPARSEMEM_ENABLE && ARCH_FLATMEM_ENABLE
 
 config ARCH_MEMORY_PROBE
 	bool "Enable sysfs memory/probe interface"