[PATCH] mtrr.c for linux-2.4.0-test9-pre7

From: IIZUKA Daisuke (iizuka@mtl.t.u-tokyo.ac.jp)
Date: Wed Sep 27 2000 - 14:53:26 EST


Hi. I found a bug on test9-pre7 mtrr.c about Cyrix MII.

When I use linux-2.4.0-test9-pre4 with MTRR enable, it works fine.
But when I try to boot linux-2.4.0-test9-pre7,
GPF occur after "mtrr: v1.36" message, and kernel freeze.

My Cyrix MII's cpuid is 0x0628, and CyrixIII's cpuid seems to be 0x0660.

On mtrr.c, it assume that CPU is CyrixIII when cpuid is 0x06XX, and
try to use intel compatible MTRR, so Cyrix MII with MTRR can't work.

Here is the ad hoc patch.

--- linux-2.4.0-test9-pre7/arch/i386/kernel/mtrr.c.dist Thu Sep 28 03:15:11 2000
+++ linux-2.4.0-test9-pre7/arch/i386/kernel/mtrr.c Thu Sep 28 03:53:30 2000
@@ -461,7 +461,8 @@
        /* Cyrix have 8 ARRs */
       case X86_VENDOR_CENTAUR:
         /* and Centaur has 8 MCR's */
- if(boot_cpu_data.x86==5)
+ if(boot_cpu_data.x86==5
+ || (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model < 6))
                return 8;
        /* the cyrix III has intel compatible MTRR */
        if(boot_cpu_data.x86==6)
-
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 30 2000 - 21:00:20 EST