diff options
| author | Sandipan Das <[email protected]> | 2025-04-18 06:19:40 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-04-18 12:29:47 +0000 |
| commit | 263e55949d8902a6a09bdb92a1ab6a3f67231abe (patch) | |
| tree | 8fcb6419589b9dfa70ce080b85178bd31a725c14 /rust/helpers/platform.c | |
| parent | x86/cpu: Add CPU model number for Bartlett Lake CPUs with Raptor Cove cores (diff) | |
| download | kernel-263e55949d8902a6a09bdb92a1ab6a3f67231abe.tar.gz kernel-263e55949d8902a6a09bdb92a1ab6a3f67231abe.zip | |
x86/cpu/amd: Fix workaround for erratum 1054
Erratum 1054 affects AMD Zen processors that are a part of Family 17h
Models 00-2Fh and the workaround is to not set HWCR[IRPerfEn]. However,
when X86_FEATURE_ZEN1 was introduced, the condition to detect unaffected
processors was incorrectly changed in a way that the IRPerfEn bit gets
set only for unaffected Zen 1 processors.
Ensure that HWCR[IRPerfEn] is set for all unaffected processors. This
includes a subset of Zen 1 (Family 17h Models 30h and above) and all
later processors. Also clear X86_FEATURE_IRPERF on affected processors
so that the IRPerfCount register is not used by other entities like the
MSR PMU driver.
Fixes: 232afb557835 ("x86/CPU/AMD: Add X86_FEATURE_ZEN1")
Signed-off-by: Sandipan Das <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/caa057a9d6f8ad579e2f1abaa71efbd5bd4eaf6d.1744956467.git.sandipan.das@amd.com
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions
