[PATCH v3 41/44] x86/cpu: <asm/processor.h>: Do not include CPUID API header

From: Ahmed S. Darwish
Date: Thu Jun 12 2025 - 19:48:01 EST


<asm/processor.h> includes the CPUID API header <asm/cpuid/api.h>, but
all what it actually needs are data types from <asm/cpuid/types.h>.

Modify the header to include <asm/cpuid/types.h> instead.

Note, this allows the CPUID API header to include <asm/processor.h> next,
without inducing a circular dependency. This will be needed by the
upcoming centralized CPUID model APIs.

Note, a large number of call sites were already using the CPUID APIs
without including <asm/cpuid/api.h>. They directly or indirectly
included <asm/processor.h>, which included the CPUID API header. Such
call sites have been modified, by parent commits, to explicitly include
the CPUID API header instead.

Signed-off-by: Ahmed S. Darwish <darwi@xxxxxxxxxxxxx>
---
arch/x86/include/asm/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index b5d90b60191b..88f8ee33bfca 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -16,7 +16,7 @@ struct vm86;
#include <uapi/asm/sigcontext.h>
#include <asm/current.h>
#include <asm/cpufeatures.h>
-#include <asm/cpuid/api.h>
+#include <asm/cpuid/types.h>
#include <asm/page.h>
#include <asm/pgtable_types.h>
#include <asm/percpu.h>
--
2.49.0