[PATCH v5 1/3] asm-generic: Add <asm-generic/cpu_device_id.h>
From: Pavel Popov
Date: Wed Nov 11 2026 - 18:59:29 EST
<asm/cpu_device_id.h> exists only on x86, so generic code that
matches on x86 CPU models has to wrap the include in #ifdef
CONFIG_X86.
Add an empty generic version, so the header can be included
unconditionally. The CPU match tables themselves still need
CONFIG_X86 for the model defines.
Suggested-by: Leon Romanovsky <leon@xxxxxxxxxx>
Link: https://lore.kernel.org/r/25a0cdb4-9c4f-4531-bdf2-8d09eedd0883@xxxxxxxxxxxxxxxx
Signed-off-by: Pavel Popov <pavel.e.popov@xxxxxxxxx>
---
include/asm-generic/Kbuild | 1 +
include/asm-generic/cpu_device_id.h | 5 +++++
2 files changed, 6 insertions(+)
create mode 100644 include/asm-generic/cpu_device_id.h
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index b7a388bef6e..fad71809ffa 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -13,6 +13,7 @@ mandatory-y += cacheflush.h
mandatory-y += cfi.h
mandatory-y += checksum.h
mandatory-y += compat.h
+mandatory-y += cpu_device_id.h
mandatory-y += current.h
mandatory-y += delay.h
mandatory-y += device.h
diff --git a/include/asm-generic/cpu_device_id.h b/include/asm-generic/cpu_device_id.h
new file mode 100644
index 00000000000..05c38c3ca1d
--- /dev/null
+++ b/include/asm-generic/cpu_device_id.h
@@ -0,0 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_GENERIC_CPU_DEVICE_ID_H
+#define _ASM_GENERIC_CPU_DEVICE_ID_H
+
+#endif /* _ASM_GENERIC_CPU_DEVICE_ID_H */
--
2.54.0