From: Andi Kleen <ak@suse.de>
To: davej@codemonkey.org.uk, mingo@elte.hu, tglx@linutronix.de,
jesse.barnes@intel.com, andreas.herrmann3@amd.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] [1/2] Fix some inaccurate comments in MTRR checking code
Date: Sat, 19 Jan 2008 05:32:18 +0100 (CET) [thread overview]
Message-ID: <20080119532.133547000@suse.de> (raw)
- is_cpu(INTEL) actually refers only to the MTRR architecture
and all AMD CPUs since K7 use the Intel MTRR architecture so the
fixup code runs on AMD too. Remove a comment claiming otherwise.
[Perhaps is_cpu should be renamed, the name is clearly confusing]
- Clarify another incorrect comment.
Cc: davej@codemonkey.org.uk
Signed-off-by: Andi Kleen <ak@suse.de>
---
arch/x86/kernel/cpu/mtrr/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux/arch/x86/kernel/cpu/mtrr/main.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/mtrr/main.c
+++ linux/arch/x86/kernel/cpu/mtrr/main.c
@@ -640,6 +640,8 @@ early_param("disable_mtrr_trim", disable
* Some buggy BIOSes don't setup the MTRRs properly for systems with certain
* memory configurations. This routine checks to make sure the MTRRs having
* a write back type cover all of the memory the kernel is intending to use.
+ * [AK: actually it doesn't check that. It just checks that the highest
+ * MTRR is matching the end of memory. That is not quite the same.]
* If not, it'll trim any memory off the end by adjusting end_pfn, removing
* it from the kernel's allocation pools, warning the user with an obnoxious
* message.
@@ -649,7 +651,6 @@ void __init mtrr_trim_uncached_memory(vo
unsigned long i, base, size, highest_addr = 0, def, dummy;
mtrr_type type;
- /* Make sure we only trim uncachable memory on Intel machines */
rdmsr(MTRRdefType_MSR, def, dummy);
def &= 0xff;
if (!is_cpu(INTEL) || disable_mtrr_trim || def != MTRR_TYPE_UNCACHABLE)
next reply other threads:[~2008-01-19 4:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-19 4:32 Andi Kleen [this message]
2008-01-19 4:32 ` [PATCH] [2/2] Fix MTRR check on AMD systems with > 4GB RAM Andi Kleen
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=20080119532.133547000@suse.de \
--to=ak@suse.de \
--cc=andreas.herrmann3@amd.com \
--cc=davej@codemonkey.org.uk \
--cc=jesse.barnes@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
Powered by JetHome