Skip to contentSkip to conversation

Add recent Centaur CPUs to PAT whitelist

X86 Dave Jones 3 participants 8 messages May 20, 2008 – May 22, 2008 x86

lore
Share & tools
lore

Dave Jones

author
#0 lore raw
Quoted 1 line

From conversation with Centaur engineers, both the newer generations

of the VIA C7, and their future CPUs support PAT, with no known errata.

arch/x86/kernel/cpu/addon_cpuid_features.c +4 -0
index c2e1ce3..638a3a6 100644
@@ -62,6 +81,10 @@ void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
 		if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
 			return;
 		break;
+	case X86_VENDOR_CENTAUR:
+		if ((c->x86 > 6) || (c->x86 == 6 && c->x86_model >= 10))
+			set_cpu_cap(c, X86_FEATURE_PAT);
+		break;
 	}
 
 	pat_disable(cpu_has_pat ?
#1 lore raw
Quoted 10 lines · Dave Jones

From conversation with Centaur engineers, both the newer generations of the VIA C7, and their future CPUs support PAT, with no known errata.

arch/x86/kernel/cpu/addon_cpuid_features.c +0 -0
index c2e1ce3..638a3a6 100644

arch/x86/kernel/cpu/addon_cpuid_features.c void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) · line 90

Quoted 10 lines
arch/x86/kernel/cpu/addon_cpuid_features.c +4 -0
@@ -62,6 +81,10 @@ void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
               if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
                       return;
               break;
+       case X86_VENDOR_CENTAUR:
+               if ((c->x86 > 6) || (c->x86 == 6 && c->x86_model >= 10))
+                       set_cpu_cap(c, X86_FEATURE_PAT);
+               break;
       }
 
       pat_disable(cpu_has_pat ?

you may need to return early...

arch/x86/kernel/cpu/addon_cpuid_features.c

Quoted 6 lines
arch/x86/kernel/cpu/addon_cpuid_features.c +6 -0
+       case X86_VENDOR_CENTAUR:
+               if ((c->x86 > 6) || (c->x86 == 6 && c->x86_model >= 10)) {
+                       set_cpu_cap(c, X86_FEATURE_PAT); /* may not need, if cpuid already has that set */
+                       return;
+               }
+               break;

YH

author
#2 lore raw
Quoted 9 lines · Yinghai Lu

Review

Quoted 7 lines
(quoted diff) +4 -0
+       case X86_VENDOR_CENTAUR:
+               if ((c->x86 > 6) || (c->x86 == 6 && c->x86_model >= 10))
+                       set_cpu_cap(c, X86_FEATURE_PAT);
+               break;
       }
 
       pat_disable(cpu_has_pat ?

you may need to return early...

Argh, old version of the patch. This one should be right.

Dave

---

Quoted 1 line

From conversation with Centaur engineers, both the newer generations

of the VIA C7, and their future CPUs support PAT, with no known errata.

arch/x86/kernel/cpu/addon_cpuid_features.c +4 -0
index c2e1ce3..b9f14f9 100644
@@ -62,6 +62,10 @@ void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
 		if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
 			return;
 		break;
+	case X86_VENDOR_CENTAUR:
+		if ((c->x86 > 6) || (c->x86 == 6 && c->x86_model >= 10))
+			return;
+		break;
 	}
 
 	pat_disable(cpu_has_pat ?
Signature · 1 line
http://www.codemonkey.org.uk
#3 lore raw
Quoted 6 lines · Dave Jones

From conversation with Centaur engineers, both the newer generations of the VIA C7, and their future CPUs support PAT, with no known errata.

Question: are there any VIA CPUs that display the PAT CPUID flag that aren't covered by the above?

-hpa

author
#4 lore raw
Quoted 10 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones

From conversation with Centaur engineers, both the newer generations of the VIA C7, and their future CPUs support PAT, with no known errata.

Question: are there any VIA CPUs that display the PAT CPUID flag that aren't covered by the above?

No. They only added PAT support with the current Esther (C7) generation iirc.

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#5 lore raw
Quoted 6 lines · Dave Jones
Quoted 5 lines · H. Peter Anvin
Quoted 4 lines · Dave Jones

From conversation with Centaur engineers, both the newer generations of the VIA C7, and their future CPUs support PAT, with no known errata.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Question: are there any VIA CPUs that display the PAT CPUID flag that aren't covered by the above?

No. They only added PAT support with the current Esther (C7) generation iirc.

OK, so we should just enable VIA unconditionally as long as PAT is displayed and not worry about generation numbers; same with Transmeta (only the Transmeta Efficeon supported PAT, and it had a strictly-coherent memory system.)

-hpa

author
#6 lore raw
Quoted 13 lines · H. Peter Anvin
Quoted 12 lines · Dave Jones
Quoted 10 lines · H. Peter Anvin
Quoted 6 lines · Dave Jones

From conversation with Centaur engineers, both the newer generations of the VIA C7, and their future CPUs support PAT, with no known errata.

Question: are there any VIA CPUs that display the PAT CPUID flag that aren't covered by the above?

Quoted 7 lines
Quoted 2 lines

No. They only added PAT support with the current Esther (C7) generation iirc.

OK, so we should just enable VIA unconditionally as long as PAT is displayed and not worry about generation numbers; same with Transmeta (only the Transmeta Efficeon supported PAT, and it had a strictly-coherent memory system.)

Like so?

Unconditionally enable PAT support on Centaur and Transmeta CPUs. All known models that advertise PAT have no known errata.

arch/x86/kernel/cpu/addon_cpuid_features.c renamed from arch/x86/kernel/cpu/addon_cpuid_features.c~ +3 -0
@@ -62,6 +62,9 @@ void __cpuinit validate_pat_support(stru
 		if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
 			return;
 		break;
+	case X86_VENDOR_CENTAUR:
+	case X86_VENDOR_TRANSMETA:
+		return;
 	}
 
 	pat_disable(cpu_has_pat ?
Signature · 1 line
http://www.codemonkey.org.uk