Skip to content

Commit f7f3dc0

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
x86/cpu/AMD: Fix erratum 1076 (CPB bit)
CPUID Fn8000_0007_EDX[CPB] is wrongly 0 on models up to B1. But they do support CPB (AMD's Core Performance Boosting cpufreq CPU feature), so fix that. Signed-off-by: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sherry Hurwitz <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 711aab1 commit f7f3dc0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,16 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
763763
}
764764
}
765765

766+
static void init_amd_zn(struct cpuinfo_x86 *c)
767+
{
768+
/*
769+
* Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
770+
* all up to and including B1.
771+
*/
772+
if (c->x86_model <= 1 && c->x86_mask <= 1)
773+
set_cpu_cap(c, X86_FEATURE_CPB);
774+
}
775+
766776
static void init_amd(struct cpuinfo_x86 *c)
767777
{
768778
early_init_amd(c);
@@ -791,6 +801,7 @@ static void init_amd(struct cpuinfo_x86 *c)
791801
case 0x10: init_amd_gh(c); break;
792802
case 0x12: init_amd_ln(c); break;
793803
case 0x15: init_amd_bd(c); break;
804+
case 0x17: init_amd_zn(c); break;
794805
}
795806

796807
/* Enable workaround for FXSAVE leak */

0 commit comments

Comments
 (0)