@@ -76,6 +76,9 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
if (m->steppings != X86_STEPPING_ANY &&
!(BIT(c->x86_stepping) & m->steppings))
continue;
+ if (m->platform_mask != X86_PLATFORM_ANY &&
+ !(BIT(c->intel_platform_id) & m->platform_mask))
+ continue;
if (m->feature != X86_FEATURE_ANY && !cpu_has(c, m->feature))
continue;
if (!x86_match_vendor_cpu_type(c, m))
@@ -691,6 +691,7 @@ struct x86_cpu_id {
__u16 feature; /* bit index */
/* Solely for kernel-internal use: DO NOT EXPORT to userspace! */
__u16 flags;
+ __u8 platform_mask;
__u8 type;
kernel_ulong_t driver_data;
};
@@ -702,6 +703,7 @@ struct x86_cpu_id {
#define X86_STEPPING_ANY 0
#define X86_STEP_MIN 0
#define X86_STEP_MAX 0xf
+#define X86_PLATFORM_ANY 0x0
#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
#define X86_CPU_TYPE_ANY 0