Commit 07a7795c authored by Hans Rosenfeld's avatar Hans Rosenfeld Committed by H. Peter Anvin

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: default avatarHans Rosenfeld <hans.rosenfeld@amd.com>
LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@amd.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent da5cabf8
...@@ -669,7 +669,7 @@ bool cpu_has_amd_erratum(const int *erratum) ...@@ -669,7 +669,7 @@ bool cpu_has_amd_erratum(const int *erratum)
} }
/* OSVW unavailable or ID unknown, match family-model-stepping range */ /* 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++)) while ((range = *erratum++))
if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) &&
(ms >= AMD_MODEL_RANGE_START(range)) && (ms >= AMD_MODEL_RANGE_START(range)) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment