diff options
| author | Ahmed S. Darwish <darwi@linutronix.de> | 2026-03-27 03:15:18 +0100 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-05-06 14:29:59 +0200 |
| commit | 7b49a3fb69e785a2425c8dc7dbd0779a0a4c0eb2 (patch) | |
| tree | a3c622a20792f24f165dfb49a64caa2b79600624 /drivers | |
| parent | 2ed46bccac394fd960c20dd9dc4c5fe0a9d7c0ef (diff) | |
| download | lwn-7b49a3fb69e785a2425c8dc7dbd0779a0a4c0eb2.tar.gz lwn-7b49a3fb69e785a2425c8dc7dbd0779a0a4c0eb2.zip | |
treewide: Explicitly include the x86 CPUID headers
Modify all CPUID call sites which implicitly include any of the CPUID
headers to explicitly include them instead.
For KVM's reverse_cpuid.h, just include <asm/cpuid/types.h> since it
references the CPUID_EAX..EDX symbols without using the CPUID APIs.
Note, this allows removing the inclusion of <asm/cpuid/api.h> from within
<asm/processor.h> next. That allows the CPUID API headers to include
<asm/processor.h> without introducing a circular dependency.
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20260327021645.555257-1-darwi@linutronix.de
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/char/agp/efficeon-agp.c | 1 | ||||
| -rw-r--r-- | drivers/cpufreq/longrun.c | 1 | ||||
| -rw-r--r-- | drivers/cpufreq/powernow-k7.c | 1 | ||||
| -rw-r--r-- | drivers/cpufreq/powernow-k8.c | 1 | ||||
| -rw-r--r-- | drivers/cpufreq/speedstep-lib.c | 1 | ||||
| -rw-r--r-- | drivers/firmware/efi/libstub/x86-5lvl.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/gma500/mmu.c | 2 | ||||
| -rw-r--r-- | drivers/hwmon/fam15h_power.c | 1 | ||||
| -rw-r--r-- | drivers/hwmon/k10temp.c | 2 | ||||
| -rw-r--r-- | drivers/hwmon/k8temp.c | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 | ||||
| -rw-r--r-- | drivers/ras/amd/fmpm.c | 1 | ||||
| -rw-r--r-- | drivers/thermal/intel/intel_hfi.c | 1 | ||||
| -rw-r--r-- | drivers/thermal/intel/x86_pkg_temp_thermal.c | 1 | ||||
| -rw-r--r-- | drivers/virt/acrn/hsm.c | 1 | ||||
| -rw-r--r-- | drivers/xen/events/events_base.c | 1 | ||||
| -rw-r--r-- | drivers/xen/grant-table.c | 1 | ||||
| -rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 3 |
18 files changed, 22 insertions, 0 deletions
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 0d25bbdc7e6a..4d0b7d7c0aad 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -27,6 +27,7 @@ #include <linux/gfp.h> #include <linux/page-flags.h> #include <linux/mm.h> +#include <asm/cpuid/api.h> #include "agp.h" #include "intel-agp.h" diff --git a/drivers/cpufreq/longrun.c b/drivers/cpufreq/longrun.c index 1caaec7c280b..f3aaca0496a4 100644 --- a/drivers/cpufreq/longrun.c +++ b/drivers/cpufreq/longrun.c @@ -14,6 +14,7 @@ #include <asm/msr.h> #include <asm/processor.h> #include <asm/cpu_device_id.h> +#include <asm/cpuid/api.h> static struct cpufreq_driver longrun_driver; diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 6b7caf4ae20d..6a930d7e6a5c 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c @@ -29,6 +29,7 @@ #include <asm/timer.h> /* Needed for recalibrate_cpu_khz() */ #include <asm/msr.h> #include <asm/cpu_device_id.h> +#include <asm/cpuid/api.h> #ifdef CONFIG_X86_POWERNOW_K7_ACPI #include <linux/acpi.h> diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c index 4d77eef53fe0..2b791f1ec51b 100644 --- a/drivers/cpufreq/powernow-k8.c +++ b/drivers/cpufreq/powernow-k8.c @@ -39,6 +39,7 @@ #include <asm/msr.h> #include <asm/cpu_device_id.h> +#include <asm/cpuid/api.h> #include <linux/acpi.h> #include <linux/mutex.h> diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c index f8b42e981635..973716c1c29c 100644 --- a/drivers/cpufreq/speedstep-lib.c +++ b/drivers/cpufreq/speedstep-lib.c @@ -15,6 +15,7 @@ #include <linux/init.h> #include <linux/cpufreq.h> +#include <asm/cpuid/api.h> #include <asm/msr.h> #include <asm/tsc.h> #include "speedstep-lib.h" diff --git a/drivers/firmware/efi/libstub/x86-5lvl.c b/drivers/firmware/efi/libstub/x86-5lvl.c index c00d0ae7ed5d..c3da05c0df8b 100644 --- a/drivers/firmware/efi/libstub/x86-5lvl.c +++ b/drivers/firmware/efi/libstub/x86-5lvl.c @@ -2,6 +2,7 @@ #include <linux/efi.h> #include <asm/boot.h> +#include <asm/cpuid/api.h> #include <asm/desc.h> #include <asm/efi.h> diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c index 6b6b44e426cf..4fbc22a59ac7 100644 --- a/drivers/gpu/drm/gma500/mmu.c +++ b/drivers/gpu/drm/gma500/mmu.c @@ -7,6 +7,8 @@ #include <linux/highmem.h> #include <linux/vmalloc.h> +#include <asm/cpuid/api.h> + #include "mmu.h" #include "psb_drv.h" #include "psb_reg.h" diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index efcbea2d070e..ad4ed4162b57 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c @@ -19,6 +19,7 @@ #include <linux/sched.h> #include <linux/topology.h> #include <asm/processor.h> +#include <asm/cpuid/api.h> #include <asm/msr.h> MODULE_DESCRIPTION("AMD Family 15h CPU processor power monitor"); diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index a5d8f45b7881..de0760dc597d 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -20,7 +20,9 @@ #include <linux/module.h> #include <linux/pci.h> #include <linux/pci_ids.h> + #include <asm/amd/node.h> +#include <asm/cpuid/api.h> #include <asm/processor.h> MODULE_DESCRIPTION("AMD Family 10h+ CPU core temperature monitor"); diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index 2b80ac410cd1..53241164570e 100644 --- a/drivers/hwmon/k8temp.c +++ b/drivers/hwmon/k8temp.c @@ -15,6 +15,7 @@ #include <linux/err.h> #include <linux/mutex.h> #include <asm/processor.h> +#include <asm/cpuid/api.h> #define TEMP_FROM_REG(val) (((((val) >> 16) & 0xff) - 49) * 1000) #define REG_TEMP 0xe4 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 7898b5075a8b..b8d467ba6d72 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -6,6 +6,7 @@ #include <linux/pci.h> #include <linux/dmi.h> #include <linux/platform_data/x86/intel_pmc_ipc.h> +#include <asm/cpuid/api.h> #include "dwmac-intel.h" #include "dwmac4.h" #include "stmmac.h" diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c index 34ef75af31cb..4ccaaf7b70bf 100644 --- a/drivers/ras/amd/fmpm.c +++ b/drivers/ras/amd/fmpm.c @@ -52,6 +52,7 @@ #include <acpi/apei.h> #include <asm/cpu_device_id.h> +#include <asm/cpuid/api.h> #include <asm/mce.h> #include "../debugfs.h" diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c index 8c4ae75231f8..3273b8fe3d4d 100644 --- a/drivers/thermal/intel/intel_hfi.c +++ b/drivers/thermal/intel/intel_hfi.c @@ -41,6 +41,7 @@ #include <linux/topology.h> #include <linux/workqueue.h> +#include <asm/cpuid/api.h> #include <asm/msr.h> #include "intel_hfi.h" diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c index 540109761f0a..d1dd2f5910e4 100644 --- a/drivers/thermal/intel/x86_pkg_temp_thermal.c +++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c @@ -20,6 +20,7 @@ #include <linux/debugfs.h> #include <asm/cpu_device_id.h> +#include <asm/cpuid/api.h> #include <asm/msr.h> #include "thermal_interrupt.h" diff --git a/drivers/virt/acrn/hsm.c b/drivers/virt/acrn/hsm.c index 74f2086fa59f..f170ff4617fd 100644 --- a/drivers/virt/acrn/hsm.c +++ b/drivers/virt/acrn/hsm.c @@ -16,6 +16,7 @@ #include <linux/slab.h> #include <asm/acrn.h> +#include <asm/cpuid/api.h> #include <asm/hypervisor.h> #include "acrn_drv.h" diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index bc9a41662efc..6ea945508a89 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -40,6 +40,7 @@ #include <linux/ktime.h> #ifdef CONFIG_X86 +#include <asm/cpuid/api.h> #include <asm/desc.h> #include <asm/ptrace.h> #include <asm/idtentry.h> diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index a6abf1ccd54c..35f879dc5dfb 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -59,6 +59,7 @@ #include <xen/swiotlb-xen.h> #include <xen/balloon.h> #ifdef CONFIG_X86 +#include <asm/cpuid/api.h> #include <asm/xen/cpuid.h> #endif #include <xen/mem-reservation.h> diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 82b0a34ded70..c202e7c553a6 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c @@ -47,6 +47,9 @@ #include <linux/rwsem.h> #include <linux/mutex.h> #include <asm/xen/hypervisor.h> +#ifdef CONFIG_X86 +#include <asm/cpuid/api.h> +#endif #include <xen/xenbus.h> #include <xen/xen.h> #include "xenbus.h" |
