[tip:x86/urgent] x86, cpu: Fix regression in AMD errata checking code

From: tip-bot for Hans Rosenfeld
Date: Wed Aug 18 2010 - 16:55:13 EST


Commit-ID: 07a7795ca2e6e66d00b184efb46bd0e23d90d3fe
Gitweb: http://git.kernel.org/tip/07a7795ca2e6e66d00b184efb46bd0e23d90d3fe
Author: Hans Rosenfeld <hans.rosenfeld@xxxxxxx>
AuthorDate: Wed, 18 Aug 2010 16:19:50 +0200
Committer: H. Peter Anvin <hpa@xxxxxxxxx>
CommitDate: Wed, 18 Aug 2010 09:16:28 -0700

x86, cpu: Fix regression in AMD errata checking code

A bug in the family-model-stepping matching code caused the presence of
errata to go undetected when OSVW was not used. This causes hangs on
some K8 systems because the E400 workaround is not enabled.

Signed-off-by: Hans Rosenfeld <hans.rosenfeld@xxxxxxx>
LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@xxxxxxx>
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxx>
---
arch/x86/kernel/cpu/amd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 60a57b1..ba5f62f 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -669,7 +669,7 @@ bool cpu_has_amd_erratum(const int *erratum)
}

/* OSVW unavailable or ID unknown, match family-model-stepping range */
- ms = (cpu->x86_model << 8) | cpu->x86_mask;
+ ms = (cpu->x86_model << 4) | cpu->x86_mask;
while ((range = *erratum++))
if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) &&
(ms >= AMD_MODEL_RANGE_START(range)) &&
--
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/