]>
Commit | Line | Data |
---|---|---|
ffc1c2fe SL |
1 | From 5a3bcc962fcd48c37f6d9360b6bc91b5d127a145 Mon Sep 17 00:00:00 2001 |
2 | From: Sasha Levin <sashal@kernel.org> | |
3 | Date: Fri, 3 Nov 2023 19:53:49 +0100 | |
4 | Subject: x86/CPU/AMD: Get rid of amd_erratum_1054[] | |
5 | ||
6 | From: Borislav Petkov (AMD) <bp@alien8.de> | |
7 | ||
8 | [ Upstream commit 54c33e23f75d5c9925495231c57d3319336722ef ] | |
9 | ||
10 | No functional changes. | |
11 | ||
12 | Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> | |
13 | Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> | |
14 | Link: http://lore.kernel.org/r/20231120104152.13740-10-bp@alien8.de | |
15 | Stable-dep-of: c7b2edd8377b ("perf/x86/amd/core: Update and fix stalled-cycles-* events for Zen 2 and later") | |
16 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
17 | --- | |
18 | arch/x86/kernel/cpu/amd.c | 6 +----- | |
19 | 1 file changed, 1 insertion(+), 5 deletions(-) | |
20 | ||
21 | diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c | |
22 | index f4373530c7de0..98fa23ef97df2 100644 | |
23 | --- a/arch/x86/kernel/cpu/amd.c | |
24 | +++ b/arch/x86/kernel/cpu/amd.c | |
25 | @@ -66,10 +66,6 @@ static const int amd_erratum_400[] = | |
26 | static const int amd_erratum_383[] = | |
27 | AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf)); | |
28 | ||
29 | -/* #1054: Instructions Retired Performance Counter May Be Inaccurate */ | |
30 | -static const int amd_erratum_1054[] = | |
31 | - AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf)); | |
32 | - | |
33 | static const int amd_erratum_1485[] = | |
34 | AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x19, 0x10, 0x0, 0x1f, 0xf), | |
35 | AMD_MODEL_RANGE(0x19, 0x60, 0x0, 0xaf, 0xf)); | |
36 | @@ -1194,7 +1190,7 @@ static void init_amd(struct cpuinfo_x86 *c) | |
37 | * Counter May Be Inaccurate". | |
38 | */ | |
39 | if (cpu_has(c, X86_FEATURE_IRPERF) && | |
40 | - !cpu_has_amd_erratum(c, amd_erratum_1054)) | |
41 | + (boot_cpu_has(X86_FEATURE_ZEN) && c->x86_model > 0x2f)) | |
42 | msr_set_bit(MSR_K7_HWCR, MSR_K7_HWCR_IRPERF_EN_BIT); | |
43 | ||
44 | check_null_seg_clears_base(c); | |
45 | -- | |
46 | 2.43.0 | |
47 |