Skip to content

Commit 5366d89

Browse files
committed
x86/cpu: Remove 'x86_cpu_desc' infrastructure
All the users of 'x86_cpu_desc' are gone. Zap it from the tree. Signed-off-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/all/20241213185133.AF0BF2BC%40davehans-spike.ostc.intel.com
1 parent f3f3251 commit 5366d89

File tree

2 files changed

+0
-66
lines changed

2 files changed

+0
-66
lines changed

arch/x86/include/asm/cpu_device_id.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -243,42 +243,7 @@
243243
VFM_MODEL(vfm), \
244244
X86_STEPPING_ANY, feature, data)
245245

246-
/*
247-
* Match specific microcode revisions.
248-
*
249-
* vendor/family/model/stepping must be all set.
250-
*
251-
* Only checks against the boot CPU. When mixed-stepping configs are
252-
* valid for a CPU model, add a quirk for every valid stepping and
253-
* do the fine-tuning in the quirk handler.
254-
*/
255-
256-
struct x86_cpu_desc {
257-
u8 x86_family;
258-
u8 x86_vendor;
259-
u8 x86_model;
260-
u8 x86_stepping;
261-
u32 x86_microcode_rev;
262-
};
263-
264-
#define INTEL_CPU_DESC(vfm, stepping, revision) { \
265-
.x86_family = VFM_FAMILY(vfm), \
266-
.x86_vendor = VFM_VENDOR(vfm), \
267-
.x86_model = VFM_MODEL(vfm), \
268-
.x86_stepping = (stepping), \
269-
.x86_microcode_rev = (revision), \
270-
}
271-
272-
#define AMD_CPU_DESC(fam, model, stepping, revision) { \
273-
.x86_family = (fam), \
274-
.x86_vendor = X86_VENDOR_AMD, \
275-
.x86_model = (model), \
276-
.x86_stepping = (stepping), \
277-
.x86_microcode_rev = (revision), \
278-
}
279-
280246
extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match);
281-
extern bool x86_cpu_has_min_microcode_rev(const struct x86_cpu_desc *table);
282247
extern bool x86_match_min_microcode_rev(const struct x86_cpu_id *table);
283248

284249
#endif /* _ASM_X86_CPU_DEVICE_ID */

arch/x86/kernel/cpu/match.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,6 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
5656
}
5757
EXPORT_SYMBOL(x86_match_cpu);
5858

59-
static const struct x86_cpu_desc *
60-
x86_match_cpu_with_stepping(const struct x86_cpu_desc *match)
61-
{
62-
struct cpuinfo_x86 *c = &boot_cpu_data;
63-
const struct x86_cpu_desc *m;
64-
65-
for (m = match; m->x86_family | m->x86_model; m++) {
66-
if (c->x86_vendor != m->x86_vendor)
67-
continue;
68-
if (c->x86 != m->x86_family)
69-
continue;
70-
if (c->x86_model != m->x86_model)
71-
continue;
72-
if (c->x86_stepping != m->x86_stepping)
73-
continue;
74-
return m;
75-
}
76-
return NULL;
77-
}
78-
79-
bool x86_cpu_has_min_microcode_rev(const struct x86_cpu_desc *table)
80-
{
81-
const struct x86_cpu_desc *res = x86_match_cpu_with_stepping(table);
82-
83-
if (!res || res->x86_microcode_rev > boot_cpu_data.microcode)
84-
return false;
85-
86-
return true;
87-
}
88-
EXPORT_SYMBOL_GPL(x86_cpu_has_min_microcode_rev);
89-
9059
bool x86_match_min_microcode_rev(const struct x86_cpu_id *table)
9160
{
9261
const struct x86_cpu_id *res = x86_match_cpu(table);

0 commit comments

Comments
 (0)