Re: 2.6.26, PAT and AMD family 6

From: matthieu castet
Date: Wed May 07 2008 - 16:44:54 EST


-- Why does this thing hide the fact that my CPU does have PAT from
me (even though it might elect to not trust it)?

Attach a trivial (untested) patch that should let know that PAT was disabled by kernel.

Matthieu

PS : if you want more tester you should print in this message a link of what should be tested to know if PAT is broken in this machine and where to report it. diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 35b4f6a..7560222 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -286,6 +286,7 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c)
{
u32 tfms, xlvl;
unsigned int ebx;
+ int pat;

memset(&c->x86_capability, 0, sizeof c->x86_capability);
if (have_cpuid_p()) {
@@ -308,6 +309,7 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c)

}

+ pat = cpu_has_pat;
clear_cpu_cap(c, X86_FEATURE_PAT);

switch (c->x86_vendor) {
@@ -320,6 +322,8 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c)
set_cpu_cap(c, X86_FEATURE_PAT);
break;
}
+ if (pat != cpu_has_pat)
+ printk(KERN_INFO "PAT support disabled");

}