Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170907170821.16021-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Borislav Petkov and committed by
Ingo Molnar
f7f3dc00 711aab1d

+11
+11
arch/x86/kernel/cpu/amd.c
··· 763 763 } 764 764 } 765 765 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 + 766 776 static void init_amd(struct cpuinfo_x86 *c) 767 777 { 768 778 early_init_amd(c); ··· 801 791 case 0x10: init_amd_gh(c); break; 802 792 case 0x12: init_amd_ln(c); break; 803 793 case 0x15: init_amd_bd(c); break; 794 + case 0x17: init_amd_zn(c); break; 804 795 } 805 796 806 797 /* Enable workaround for FXSAVE leak */