public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Troels Walsted Hansen <troels@thule.no>
To: linux-kernel@vger.kernel.org, davej@suse.de
Subject: [PATCH] Fix MTRR support for AMD Athlon
Date: Mon, 12 Mar 2001 21:47:48 +0100	[thread overview]
Message-ID: <3AAD35F4.61F47450@thule.no> (raw)

Hello world,

Dave Jones' recent 2.4.2ac17 patch to mtrr.c to support the Cyrix III
unfortunately broke the AMD Athlon support. Here's a patch to correct
the problem (Dave must have overlooked the fall-through logic of the
switch statement).

Enjoy...

-- 
Troels Walsted Hansen

--- mtrr.c1.38  Sun Mar 11 13:42:30 2001
+++ mtrr.c      Mon Mar 12 21:02:15 2001
@@ -235,6 +235,12 @@
   v1.38
     20010309   Dave Jones <davej@suse.de>
               Add support for Cyrix III.
+
+  v1.39
+    20010312   Troels Walsted Hansen <troels@thule.no>
+              Fixed the AMD Athlon support that Dave Jones' patch
broke.
+              Also updated the version number to match this changelog.
+
 */
 #include <linux/types.h>
 #include <linux/errno.h>
@@ -274,7 +280,7 @@
 #include <asm/hardirq.h>
 #include <linux/irq.h>
 
-#define MTRR_VERSION            "1.37 (20001109)"
+#define MTRR_VERSION            "1.39 (20010312)"
 
 #define TRUE  1
 #define FALSE 0
@@ -1964,6 +1970,14 @@
        get_mtrr = intel_get_mtrr;
        set_mtrr_up = intel_set_mtrr_up;
        switch (boot_cpu_data.x86_vendor) {
+       case X86_VENDOR_CENTAUR:
+               /* Cyrix III has Intel style MTRRs, but doesn't support
PAE */
+               if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model ==
6) {
+                       size_or_mask  = 0xfff00000; /* 32 bits */
+                       size_and_mask = 0;
+               }
+               break;
+
        case X86_VENDOR_AMD:
                /* The original Athlon docs said that
                   total addressable memory is 44 bits wide.
@@ -1982,13 +1996,7 @@
                        size_and_mask = ~size_or_mask & 0xfff00000;
                        break;
                }
-       case X86_VENDOR_CENTAUR:
-               /* Cyrix III has Intel style MTRRs, but doesn't support
PAE */
-               if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model ==
6) {
-                       size_or_mask  = 0xfff00000; /* 32 bits */
-                       size_and_mask = 0;
-               }
-               break;
+               /* NOTE: fallthrough to default here! */
 
        default:
                /* Intel, etc. */

             reply	other threads:[~2001-03-12 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-12 20:47 Troels Walsted Hansen [this message]
2001-03-12 22:57 ` [PATCH] Fix MTRR support for AMD Athlon davej

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=3AAD35F4.61F47450@thule.no \
    --to=troels@thule.no \
    --cc=davej@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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