x86/devicetable: Move x86 specific macro out of generic code
authorThomas Gleixner <tglx@linutronix.de>
Fri, 20 Mar 2020 13:13:46 +0000 (14:13 +0100)
committerBorislav Petkov <bp@suse.de>
Tue, 24 Mar 2020 20:02:47 +0000 (21:02 +0100)
There is no reason that this gunk is in a generic header file. The wildcard
defines need to stay as they are required by file2alias.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lkml.kernel.org/r/20200320131508.736205164@linutronix.de
arch/x86/include/asm/cpu_device_id.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx/vmx.c
drivers/cpufreq/acpi-cpufreq.c
drivers/cpufreq/amd_freq_sensitivity.c
include/linux/mod_devicetable.h

index 31c379c1da41c48b7f4ee89d3c100d62895ff5b2..a28dc6ba5be1574b4fb58e33ee0cd5d66a22f636 100644 (file)
@@ -6,9 +6,20 @@
  * Declare drivers belonging to specific x86 CPUs
  * Similar in spirit to pci_device_id and related PCI functions
  */
-
 #include <linux/mod_devicetable.h>
 
+/*
+ * The wildcard initializers are in mod_devicetable.h because
+ * file2alias needs them. Sigh.
+ */
+
+#define X86_FEATURE_MATCH(x) {                 \
+       .vendor         = X86_VENDOR_ANY,       \
+       .family         = X86_FAMILY_ANY,       \
+       .model          = X86_MODEL_ANY,        \
+       .feature        = x,                    \
+}
+
 /*
  * Match specific microcode revisions.
  *
index bef0ba35f121b3ba474437d6599fb1bc1d2487b1..5753fc3bcfc1d23e7a0023c7047975ab285f7bdd 100644 (file)
@@ -48,6 +48,7 @@
 #include <asm/kvm_para.h>
 #include <asm/irq_remapping.h>
 #include <asm/spec-ctrl.h>
+#include <asm/cpu_device_id.h>
 
 #include <asm/virtext.h>
 #include "trace.h"
index 3be25ecae1455d9f30972bc2daaafab41eafa2ac..31c80fa4653d3c98408e3d32931f406558ebeb95 100644 (file)
@@ -31,6 +31,7 @@
 #include <asm/apic.h>
 #include <asm/asm.h>
 #include <asm/cpu.h>
+#include <asm/cpu_device_id.h>
 #include <asm/debugreg.h>
 #include <asm/desc.h>
 #include <asm/fpu/internal.h>
index d6f7df33ab8cefde1eea21bc82c330fff7080213..7ff6595255870a27ac762f33270ec5ba3ec03ac8 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/cpufeature.h>
+#include <asm/cpu_device_id.h>
 
 MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski");
 MODULE_DESCRIPTION("ACPI Processor P-States Driver");
index e2df9d1121063ba8d4a6e85b950d4b23dbaa38e6..5107cbe2d64dd2aeabb06d8b0e1d63e2c9dccb1a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <asm/msr.h>
 #include <asm/cpufeature.h>
+#include <asm/cpu_device_id.h>
 
 #include "cpufreq_ondemand.h"
 
index e3596db077dc598f3a44c2e47086d0b017d4e551..f8b66d43acf645ee3b3d2eaf3b782bf4524d6206 100644 (file)
@@ -667,9 +667,7 @@ struct x86_cpu_id {
        kernel_ulong_t driver_data;
 };
 
-#define X86_FEATURE_MATCH(x) \
-       { X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x }
-
+/* Wild cards for x86_cpu_id::vendor, family, model and feature */
 #define X86_VENDOR_ANY 0xffff
 #define X86_FAMILY_ANY 0
 #define X86_MODEL_ANY  0