[PATCH 0/7] Include <asm/cpu_device_id.h> without #ifdef CONFIG_X86

From: Pavel Popov

Date: Wed Nov 11 2026 - 18:52:31 EST


<asm/cpu_device_id.h> exists only on x86, so generic code that uses it
wraps the include in #ifdef CONFIG_X86. The P2PDMA series [1] adds a
generic version of the header, so the include can be unconditional.

This series drops the #ifdef around the include in the remaining
users, and in ccp, which does not use the header, the include itself.
Some of them also include <asm/intel-family.h>, which has no
generic version. That include is removed: on x86 it is already pulled
in by <asm/cpu_device_id.h>, and on other architectures the INTEL_*
model defines are not used. The #ifdef stays around code that needs
x86 for other reasons: CPU match tables using the INTEL_* model
defines and boot_cpu_data accesses.

Patches 1-6 are independent of each other and can go through the
respective trees once [1] has landed. Patch 7 does not depend on [1].

Based on mainline (7.4-rc2+) plus [1]. Built with x86_64 and arm64
allmodconfig, each patch separately.

[1] https://lore.kernel.org/r/20261111234439.4098-1-pavel.e.popov@xxxxxxxxx

Pavel Popov (7):
ACPI: mipi-disco-img: Include <asm/cpu_device_id.h> unconditionally
drm/i915: Include <asm/cpu_device_id.h> unconditionally
drm/amdgpu: Include <asm/cpu_device_id.h> unconditionally
cpufreq: ondemand: Include <asm/cpu_device_id.h> unconditionally
platform/x86: Include <asm/cpu_device_id.h> unconditionally in soc.h
tpm: Include <asm/cpu_device_id.h> unconditionally
crypto: ccp - Drop unused <asm/cpu_device_id.h> include

drivers/acpi/mipi-disco-img.c | 5 ++---
drivers/char/tpm/tpm.h | 2 --
drivers/cpufreq/cpufreq_ondemand.h | 4 ++--
drivers/crypto/ccp/ccp-dev.c | 3 ---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
drivers/gpu/drm/i915/intel_cpu_info.c | 5 ++---
include/linux/platform_data/x86/soc.h | 5 ++---
7 files changed, 8 insertions(+), 19 deletions(-)


base-commit: 067c5c24cef23d913b67eaaf71ae67e7169a6620
prerequisite-patch-id: 2a8952c8b8b6b019585a8bc449db628f458658cb
prerequisite-patch-id: 6b1715c7e4f230fedfcadf38303ce5966922caff
prerequisite-patch-id: 88872ad297c6b8ec80cb4ec4057ab281e10c148d
--
2.54.0