* [tip: x86/cpu] x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
@ 2024-12-18 1:00 tip-bot2 for Dave Hansen
2024-12-18 14:04 ` Huang, Kai
0 siblings, 1 reply; 3+ messages in thread
From: tip-bot2 for Dave Hansen @ 2024-12-18 1:00 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Dave Hansen, x86, linux-kernel
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 064e8b122b65525115c4c2f181bd2ea33265e0c6
Gitweb: https://git.kernel.org/tip/064e8b122b65525115c4c2f181bd2ea33265e0c6
Author: Dave Hansen <dave.hansen@linux.intel.com>
AuthorDate: Fri, 13 Dec 2024 10:51:32 -08:00
Committer: Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Tue, 17 Dec 2024 16:19:57 -08:00
x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
The AMD erratum 1386 detection code uses and old style 'x86_cpu_desc'
table. Replace it with 'x86_cpu_id' so the old style can be removed.
I did not create a new helper macro here. The new table is certainly
more noisy than the old and it can be improved on. But I was hesitant
to create a new macro just for a single site that is only two ugly
lines in the end.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20241213185132.07555E1D%40davehans-spike.ostc.intel.com
---
arch/x86/kernel/cpu/amd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index d8408aa..7bb5b1a 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -795,10 +795,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
clear_rdrand_cpuid_bit(c);
}
-static const struct x86_cpu_desc erratum_1386_microcode[] = {
- AMD_CPU_DESC(0x17, 0x1, 0x2, 0x0800126e),
- AMD_CPU_DESC(0x17, 0x31, 0x0, 0x08301052),
- {},
+static const struct x86_cpu_id erratum_1386_microcode[] = {
+ X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x01), 0x2, 0x2, 0x0800126e),
+ X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x31), 0x0, 0x0, 0x08301052),
};
static void fix_erratum_1386(struct cpuinfo_x86 *c)
@@ -814,7 +813,7 @@ static void fix_erratum_1386(struct cpuinfo_x86 *c)
* Clear the feature flag only on microcode revisions which
* don't have the fix.
*/
- if (x86_cpu_has_min_microcode_rev(erratum_1386_microcode))
+ if (x86_match_min_microcode_rev(erratum_1386_microcode))
return;
clear_cpu_cap(c, X86_FEATURE_XSAVES);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [tip: x86/cpu] x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
2024-12-18 1:00 [tip: x86/cpu] x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id' tip-bot2 for Dave Hansen
@ 2024-12-18 14:04 ` Huang, Kai
0 siblings, 0 replies; 3+ messages in thread
From: Huang, Kai @ 2024-12-18 14:04 UTC (permalink / raw)
To: linux-kernel, linux-tip-commits; +Cc: Dave Hansen, x86
On 18/12/2024 9:00 am, tip-bot2 for Dave Hansen wrote:
> The following commit has been merged into the x86/cpu branch of tip:
>
> Commit-ID: 064e8b122b65525115c4c2f181bd2ea33265e0c6
> Gitweb: https://git.kernel.org/tip/064e8b122b65525115c4c2f181bd2ea33265e0c6
> Author: Dave Hansen <dave.hansen@linux.intel.com>
> AuthorDate: Fri, 13 Dec 2024 10:51:32 -08:00
> Committer: Dave Hansen <dave.hansen@linux.intel.com>
> CommitterDate: Tue, 17 Dec 2024 16:19:57 -08:00
>
> x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
>
> The AMD erratum 1386 detection code uses and old style 'x86_cpu_desc'
> table. Replace it with 'x86_cpu_id' so the old style can be removed.
>
> I did not create a new helper macro here. The new table is certainly
> more noisy than the old and it can be improved on. But I was hesitant
> to create a new macro just for a single site that is only two ugly
> lines in the end.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Hi Dave,
Just let you know there's a duplicated SoB here.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: x86/cpu] x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
@ 2024-12-18 14:22 tip-bot2 for Dave Hansen
0 siblings, 0 replies; 3+ messages in thread
From: tip-bot2 for Dave Hansen @ 2024-12-18 14:22 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Dave Hansen, x86, linux-kernel
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: f3f3251526739bb975b97f840c56b3054dba8638
Gitweb: https://git.kernel.org/tip/f3f3251526739bb975b97f840c56b3054dba8638
Author: Dave Hansen <dave.hansen@linux.intel.com>
AuthorDate: Fri, 13 Dec 2024 10:51:32 -08:00
Committer: Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Wed, 18 Dec 2024 06:09:04 -08:00
x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id'
The AMD erratum 1386 detection code uses and old style 'x86_cpu_desc'
table. Replace it with 'x86_cpu_id' so the old style can be removed.
I did not create a new helper macro here. The new table is certainly
more noisy than the old and it can be improved on. But I was hesitant
to create a new macro just for a single site that is only two ugly
lines in the end.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20241213185132.07555E1D%40davehans-spike.ostc.intel.com
---
arch/x86/kernel/cpu/amd.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index d8408aa..7bb5b1a 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -795,10 +795,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
clear_rdrand_cpuid_bit(c);
}
-static const struct x86_cpu_desc erratum_1386_microcode[] = {
- AMD_CPU_DESC(0x17, 0x1, 0x2, 0x0800126e),
- AMD_CPU_DESC(0x17, 0x31, 0x0, 0x08301052),
- {},
+static const struct x86_cpu_id erratum_1386_microcode[] = {
+ X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x01), 0x2, 0x2, 0x0800126e),
+ X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x31), 0x0, 0x0, 0x08301052),
};
static void fix_erratum_1386(struct cpuinfo_x86 *c)
@@ -814,7 +813,7 @@ static void fix_erratum_1386(struct cpuinfo_x86 *c)
* Clear the feature flag only on microcode revisions which
* don't have the fix.
*/
- if (x86_cpu_has_min_microcode_rev(erratum_1386_microcode))
+ if (x86_match_min_microcode_rev(erratum_1386_microcode))
return;
clear_cpu_cap(c, X86_FEATURE_XSAVES);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-18 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18 1:00 [tip: x86/cpu] x86/cpu: Move AMD erratum 1386 table over to 'x86_cpu_id' tip-bot2 for Dave Hansen
2024-12-18 14:04 ` Huang, Kai
-- strict thread matches above, loose matches on Subject: below --
2024-12-18 14:22 tip-bot2 for Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox