Skip to content

Commit c44d1ac

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "A single fix addressing the missing CP8 feature bit in CPUID for a range of AMD ZEN models/mask revisions" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/AMD: Fix erratum 1076 (CPB bit)
2 parents 2bd6bf0 + f7f3dc0 commit c44d1ac

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)