Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / i386 / kernel / cpu / centaur.c
index e85f482..bd75629 100644 (file)
@@ -4,6 +4,7 @@
 #include <asm/processor.h>
 #include <asm/msr.h>
 #include <asm/e820.h>
+#include <asm/mtrr.h>
 #include "cpu.h"
 
 #ifdef CONFIG_X86_OOSTORE
@@ -286,23 +287,20 @@ static void __init init_c3(struct cpuinfo_x86 *c)
                c->x86_capability[5] = cpuid_edx(0xC0000001);
        }
 
-       switch (c->x86_model) {
-               case 6 ... 8:           /* Cyrix III family */
-                       rdmsr (MSR_VIA_FCR, lo, hi);
-                       lo |= (1<<1 | 1<<7);    /* Report CX8 & enable PGE */
-                       wrmsr (MSR_VIA_FCR, lo, hi);
-
-                       set_bit(X86_FEATURE_CX8, c->x86_capability);
-                       set_bit(X86_FEATURE_3DNOW, c->x86_capability);
+       /* Cyrix III family needs CX8 & PGE explicity enabled. */
+       if (c->x86_model >=6 && c->x86_model <= 9) {
+               rdmsr (MSR_VIA_FCR, lo, hi);
+               lo |= (1<<1 | 1<<7);
+               wrmsr (MSR_VIA_FCR, lo, hi);
+               set_bit(X86_FEATURE_CX8, c->x86_capability);
+       }
 
-                       /* fall through */
+       /* Before Nehemiah, the C3's had 3dNOW! */
+       if (c->x86_model >=6 && c->x86_model <9)
+               set_bit(X86_FEATURE_3DNOW, c->x86_capability);
 
-               case 9: /* Nehemiah */
-               default:
-                       get_model_name(c);
-                       display_cacheinfo(c);
-                       break;
-       }
+       get_model_name(c);
+       display_cacheinfo(c);
 }
 
 static void __init init_centaur(struct cpuinfo_x86 *c)
@@ -408,10 +406,6 @@ static void __init init_centaur(struct cpuinfo_x86 *c)
                                winchip2_protect_mcr();
 #endif
                                break;
-                       case 10:
-                               name="4";
-                               /* no info on the WC4 yet */
-                               break;
                        default:
                                name="??";
                        }
@@ -477,3 +471,11 @@ int __init centaur_init_cpu(void)
 }
 
 //early_arch_initcall(centaur_init_cpu);
+
+static int __init centaur_exit_cpu(void)
+{
+       cpu_devs[X86_VENDOR_CENTAUR] = NULL;
+       return 0;
+}
+
+late_initcall(centaur_exit_cpu);