public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Walrond <andrew@walrond.org>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Re: Dmesg: Use a PAE enabled kernel
Date: 12 Mar 2003 13:05:02 -0800	[thread overview]
Message-ID: <523clswb29.fsf_-_@topspin.com> (raw)
In-Reply-To: <1046719362.7316.4.camel@irongate.swansea.linux.org.uk>

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 */

  reply	other threads:[~2003-03-12 20:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-03 15:23 Dmesg: Use a PAE enabled kernel Andrew Walrond
2003-03-03 16:08 ` Martin J. Bligh
2003-03-03 16:24   ` Andrew Walrond
2003-03-03 16:33     ` Andrew Walrond
2003-03-03 17:42     ` Martin J. Bligh
2003-03-03 17:46     ` Alan Cox
2003-03-03 16:49       ` Andrew Walrond
2003-03-03 19:22         ` Alan Cox
2003-03-12 21:05           ` Roland Dreier [this message]
2003-03-04  3:22     ` H. Peter Anvin
2003-03-03 16:54 ` Alan Cox

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=523clswb29.fsf_-_@topspin.com \
    --to=roland@topspin.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrew@walrond.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    /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