Skip to content

Commit 0237199

Browse files
FlyGoatsuryasaimadhu
authored andcommitted
x86/CPU/AMD: Set the CPB bit unconditionally on F17h
Some F17h models do not have CPB set in CPUID even though the CPU supports it. Set the feature bit unconditionally on all F17h. [ bp: Rewrite commit message and patch. ] Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Sherry Hurwitz <sherry.hurwitz@amd.com> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20181120030018.5185-1-jiaxun.yang@flygoat.com
1 parent 1c7fc5c commit 0237199

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -819,11 +819,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
819819
static void init_amd_zn(struct cpuinfo_x86 *c)
820820
{
821821
set_cpu_cap(c, X86_FEATURE_ZEN);
822-
/*
823-
* Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
824-
* all up to and including B1.
825-
*/
826-
if (c->x86_model <= 1 && c->x86_stepping <= 1)
822+
823+
/* Fix erratum 1076: CPB feature bit not being set in CPUID. */
824+
if (!cpu_has(c, X86_FEATURE_CPB))
827825
set_cpu_cap(c, X86_FEATURE_CPB);
828826
}
829827

0 commit comments

Comments
 (0)