[PATCH] Add a VMSPLIT_2G_OPT config option.

Christian Melki christian.melki at t2data.com
Tue Nov 3 16:50:57 EST 2020


This allows 2GB systems to have their RAM entirely mapped as low memory.
Needed to avoid CONFIG_HIGHMEM for the last 256M.

Definitely not an uncommon configuration in the industry.
Following the discussions about deprecating CONFIG_HIGHMEM down the 
line, this is probably a nice addition.

Tested on a Kontron i.MX6 Quad board equipped with 2G RAM.

Signed-off-by: Christian Melki <christian.melki at t2data.com>
---
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fe2f17eb2b50..b86eab96fd58 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1311,6 +1311,9 @@ choice
  		bool "3G/1G user/kernel split (for full 1G low memory)"
  	config VMSPLIT_2G
  		bool "2G/2G user/kernel split"
+	config VMSPLIT_2G_OPT
+		depends on !ARM_LPAE
+		bool "2G/2G user/kernel split (for full 2G low memory)"
  	config VMSPLIT_1G
  		bool "1G/3G user/kernel split"
  endchoice
@@ -1319,6 +1322,7 @@ config PAGE_OFFSET
  	hex
  	default PHYS_OFFSET if !MMU
  	default 0x40000000 if VMSPLIT_1G
+	default 0x70000000 if VMSPLIT_2G_OPT
  	default 0x80000000 if VMSPLIT_2G
  	default 0xB0000000 if VMSPLIT_3G_OPT
  	default 0xC0000000
--



More information about the linux-arm-kernel mailing list