[patch] x86: lfence fix

From: Ingo Molnar
Date: Tue Jan 15 2008 - 16:03:56 EST



* Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

> I just tested x86.git and then x86.git + patch you send (+ build fixes
> in both cases), none of your patchkits. If you want me to test some
> other patchkit please point me to it.
>
> The problem happens with plain git-x86 (+ build fixes) and also with
> git-x86 + your patch.

i was held up from debugging your problem by a bug introduced by you
into x86.git ;-) See the fix below.

Ingo

----------------------------->
Subject: x86: lfence fix
From: Ingo Molnar <mingo@xxxxxxx>

LFENCE is available on XMM2 or higher Intel CPUs - not XMM or higher...

this caused boot failures on pre-XMM2 CPUs.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/cpu/intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-x86.q/arch/x86/kernel/cpu/intel.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/cpu/intel.c
+++ linux-x86.q/arch/x86/kernel/cpu/intel.c
@@ -206,7 +206,7 @@ static void __cpuinit init_intel(struct
}
#endif

- if (cpu_has_xmm)
+ if (cpu_has_xmm2)
set_bit(X86_FEATURE_LFENCE_RDTSC, c->x86_capability);
if (c->x86 == 15) {
set_bit(X86_FEATURE_P4, c->x86_capability);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/