]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86, cpu: Fix regression in AMD errata checking code
authorHans Rosenfeld <hans.rosenfeld@amd.com>
Wed, 18 Aug 2010 14:19:50 +0000 (16:19 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 18 Aug 2010 16:16:28 +0000 (09:16 -0700)
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@amd.com>
LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/cpu/amd.c

index 60a57b13082d2658e32da03193a071a4b314cc73..ba5f62f45f01e136e849894076917684ffcd8c40 100644 (file)
@@ -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)) &&