lkml.org 
[lkml]   [2003]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Re: Dmesg: Use a PAE enabled kernel
From
Date
How about something like the following (untested) patch?

This is against 2.5 but will probably apply with offset to 2.4.

- Roland

--- 1.71/arch/i386/kernel/setup.c Thu Feb 27 16:10:55 2003
+++ edited/arch/i386/kernel/setup.c Wed Mar 12 12:54:42 2003
@@ -634,8 +634,11 @@
max_low_pfn = MAXMEM_PFN;
#ifndef CONFIG_HIGHMEM
/* Maximum memory usable is what is directly addressable */
- printk(KERN_WARNING "Warning only %ldMB will be used.\n",
- MAXMEM>>20);
+ printk(KERN_WARNING "WARNING: only %ldMB can be addressed.\n"
+ "%ldMB of RAM is inaccessible and will not be used.\n",
+ MAXMEM >> 20,
+ PAGE_SHIFT < 20 ? (max_pfn - MAXMEM_PFN) >> (20 - PAGE_SHIFT)
+ : (max_pfn - MAXMEM_PFN) << (PAGE_SHIFT - 20));
if (max_pfn > MAX_NONPAE_PFN)
printk(KERN_WARNING "Use a PAE enabled kernel.\n");
else
@@ -644,9 +647,12 @@
#else /* !CONFIG_HIGHMEM */
#ifndef CONFIG_X86_PAE
if (max_pfn > MAX_NONPAE_PFN) {
- max_pfn = MAX_NONPAE_PFN;
- printk(KERN_WARNING "Warning only 4GB will be used.\n");
+ printk(KERN_WARNING "WARNING: only 4GB can be addressed.\n"
+ "%ldMB of RAM is inaccessible and will not be used.\n",
+ PAGE_SHIFT < 20 ? (max_pfn - MAX_NONPAE_PFN) >> (20 - PAGE_SHIFT)
+ : (max_pfn - MAX_NONPAE_PFN) << (PAGE_SHIFT - 20));
printk(KERN_WARNING "Use a PAE enabled kernel.\n");
+ max_pfn = MAX_NONPAE_PFN;
}
#endif /* !CONFIG_X86_PAE */
#endif /* !CONFIG_HIGHMEM */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.185 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site