[PATCH] K6-2+ MTRR fix

From: Vince Weaver (weave@eng.umd.edu)
Date: Fri Sep 22 2000 - 19:12:22 EST


Hello

This patch enables the MTRR support for K6-2+ processors. Thanks to
Bennett Feitell for alerting me to this problem.

Also, it has the fix that enabled memory write-allocate in the cache, a
patch I posted a month or so back but Linus still hasn't merged in
[despite repeated e-mails].

Before the patch /proc/mtrr wouldn't even exist, and mtrr was not listed
in /proc/cpuinfo.

Now, while running X, I get a normal:

hal:/usr/src/linux$ cat /proc/mtrr
reg00: base=0xe2000000 (3616MB), size= 32MB: write-combining, count=2

The patch is against kernel 2.4.0-test8 but it applies against most recent
kernels as setup.c hasn't changed much recently.

Vince

____________
\ /\ /\ / Vince Weaver
 \/__\/__\/ weave@eng.umd.edu http://www.glue.umd.edu/~weave

--- ./arch/i386/kernel/setup.c.old Fri Sep 22 20:03:37 2000
+++ ./arch/i386/kernel/setup.c Fri Sep 22 19:55:03 2000
@@ -875,7 +875,8 @@
          * Set MTRR capability flag if appropriate
          */
         if(boot_cpu_data.x86 == 5) {
- if((boot_cpu_data.x86_model == 9) ||
+ if((boot_cpu_data.x86_model == 13) ||
+ (boot_cpu_data.x86_model == 9) ||
                    ((boot_cpu_data.x86_model == 8) &&
                     (boot_cpu_data.x86_mask >= 8)))
                         c->x86_capability |= X86_FEATURE_MTRR;
@@ -916,7 +917,7 @@
                                 }
                                 break;
                         }
- if (c->x86_model == 8 || c->x86_model == 9)
+ if (c->x86_model == 8 || c->x86_model == 9 || c->x86_model == 13)
                         {
                                 /* The more serious chips .. */
                                 



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:28 EST