Hi,
It does annoy me that any 1G i386 machine will end up with 1/8th of the
memory as highmem. A patch like this one has been used in various places
since the early 2.4 days at least, is there a reason why it isn't merged
yet? Note I just hacked this one up, but similar patches abound I'm
sure. Bugs are mine.
Signed-off-by: Jens Axboe <[email protected]>
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index d849c68..0b2457b 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -444,6 +464,24 @@ config HIGHMEM64G
endchoice
+choice
+ depends on NOHIGHMEM
+ prompt "Memory split"
+ default DEFAULT_3G
+ help
+ Select the wanted split between kernel and user memory. On a 1G
+ machine, the 3G/1G default split will result in 128MiB of high
+ memory. Selecting a 2G/2G split will make all of memory available
+ as low memory. Note that this will make your kernel incompatible
+ with binary only kernel modules.
+
+ config DEFAULT_3G
+ bool "3G/1G user/kernel split"
+ config DEFAULT_2G
+ bool "2G/2G user/kernel split"
+
+endchoice
+
config HIGHMEM
bool
depends on HIGHMEM64G || HIGHMEM4G
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h
index 73296d9..be5f6b6 100644
--- a/include/asm-i386/page.h
+++ b/include/asm-i386/page.h
@@ -110,10 +110,22 @@ extern int page_is_ram(unsigned long pag
#endif /* __ASSEMBLY__ */
#ifdef __ASSEMBLY__
+#if defined(CONFIG_DEFAULT_3G)
#define __PAGE_OFFSET (0xC0000000)
+#elif defined(CONFIG_DEFAULT_2G)
+#define __PAGE_OFFSET (0x80000000)
+#else
+#error" Bad memory split"
+#endif
#define __PHYSICAL_START CONFIG_PHYSICAL_START
#else
+#if defined(CONFIG_DEFAULT_3G)
#define __PAGE_OFFSET (0xC0000000UL)
+#elif defined(CONFIG_DEFAULT_2G)
+#define __PAGE_OFFSET (0x80000000UL)
+#else
+#error "Bad memory split"
+#endif
#define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START)
#endif
#define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START)
--
Jens Axboe
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]