<asm/processor.h> includes the CPUID API header <asm/cpuid/api.h> but it
does not need it.
Remove the CPUID API header include.
This allows the CPUID API header to include <asm/processor.h> without
introducing a circular dependency, which is needed for the upcoming CPUID
model and parser.
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
---
arch/x86/include/asm/processor.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index bde58f6510ac..910e36b0c00d 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -16,7 +16,6 @@ struct vm86;
#include <uapi/asm/sigcontext.h>
#include <asm/current.h>
#include <asm/cpufeatures.h>
-#include <asm/cpuid/api.h>
#include <asm/page.h>
#include <asm/pgtable_types.h>
#include <asm/percpu.h>
--
2.49.0
Hi Ahmed,
kernel test robot noticed the following build errors:
[auto build test ERROR on d7b8f8e20813f0179d8ef519541a3527e7661d3a]
url: https://github.com/intel-lab-lkp/linux/commits/Ahmed-S-Darwish/x86-cpuid-Remove-transitional-asm-cpuid-h-header/20250710-043320
base: d7b8f8e20813f0179d8ef519541a3527e7661d3a
patch link: https://lore.kernel.org/r/20250709203033.90125-7-darwi%40linutronix.de
patch subject: [PATCH v2 6/6] x86/cpu: <asm/processor.h>: Do not include CPUID API header
config: i386-randconfig-005-20250714 (https://download.01.org/0day-ci/archive/20250715/202507150403.hKKg9xjJ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250715/202507150403.hKKg9xjJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507150403.hKKg9xjJ-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/char/agp/efficeon-agp.c: In function 'efficeon_create_gatt_table':
>> drivers/char/agp/efficeon-agp.c:197:37: error: implicit declaration of function 'cpuid_ebx' [-Werror=implicit-function-declaration]
197 | const int clflush_chunk = ((cpuid_ebx(1) >> 8) & 0xff) << 3;
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/cpuid_ebx +197 drivers/char/agp/efficeon-agp.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 177
^1da177e4c3f41 Linus Torvalds 2005-04-16 178
^1da177e4c3f41 Linus Torvalds 2005-04-16 179 /*
d6e05edc59ecd7 Andreas Mohr 2006-06-26 180 * Since we don't need contiguous memory we just try
^1da177e4c3f41 Linus Torvalds 2005-04-16 181 * to get the gatt table once
^1da177e4c3f41 Linus Torvalds 2005-04-16 182 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 183
^1da177e4c3f41 Linus Torvalds 2005-04-16 184 #define GET_PAGE_DIR_OFF(addr) (addr >> 22)
^1da177e4c3f41 Linus Torvalds 2005-04-16 185 #define GET_PAGE_DIR_IDX(addr) (GET_PAGE_DIR_OFF(addr) - \
^1da177e4c3f41 Linus Torvalds 2005-04-16 186 GET_PAGE_DIR_OFF(agp_bridge->gart_bus_addr))
^1da177e4c3f41 Linus Torvalds 2005-04-16 187 #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12)
^1da177e4c3f41 Linus Torvalds 2005-04-16 188 #undef GET_GATT
^1da177e4c3f41 Linus Torvalds 2005-04-16 189 #define GET_GATT(addr) (efficeon_private.gatt_pages[\
^1da177e4c3f41 Linus Torvalds 2005-04-16 190 GET_PAGE_DIR_IDX(addr)]->remapped)
^1da177e4c3f41 Linus Torvalds 2005-04-16 191
^1da177e4c3f41 Linus Torvalds 2005-04-16 192 static int efficeon_create_gatt_table(struct agp_bridge_data *bridge)
^1da177e4c3f41 Linus Torvalds 2005-04-16 193 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 194 int index;
^1da177e4c3f41 Linus Torvalds 2005-04-16 195 const int pati = EFFICEON_PATI;
^1da177e4c3f41 Linus Torvalds 2005-04-16 196 const int present = EFFICEON_PRESENT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @197 const int clflush_chunk = ((cpuid_ebx(1) >> 8) & 0xff) << 3;
^1da177e4c3f41 Linus Torvalds 2005-04-16 198 int num_entries, l1_pages;
^1da177e4c3f41 Linus Torvalds 2005-04-16 199
^1da177e4c3f41 Linus Torvalds 2005-04-16 200 num_entries = A_SIZE_LVL2(agp_bridge->current_size)->num_entries;
^1da177e4c3f41 Linus Torvalds 2005-04-16 201
^1da177e4c3f41 Linus Torvalds 2005-04-16 202 printk(KERN_DEBUG PFX "efficeon_create_gatt_table(%d)\n", num_entries);
^1da177e4c3f41 Linus Torvalds 2005-04-16 203
^1da177e4c3f41 Linus Torvalds 2005-04-16 204 /* There are 2^10 PTE pages per PDE page */
^1da177e4c3f41 Linus Torvalds 2005-04-16 205 BUG_ON(num_entries & 0x3ff);
^1da177e4c3f41 Linus Torvalds 2005-04-16 206 l1_pages = num_entries >> 10;
^1da177e4c3f41 Linus Torvalds 2005-04-16 207
^1da177e4c3f41 Linus Torvalds 2005-04-16 208 for (index = 0 ; index < l1_pages ; index++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 209 int offset;
^1da177e4c3f41 Linus Torvalds 2005-04-16 210 unsigned long page;
^1da177e4c3f41 Linus Torvalds 2005-04-16 211 unsigned long value;
^1da177e4c3f41 Linus Torvalds 2005-04-16 212
^1da177e4c3f41 Linus Torvalds 2005-04-16 213 page = efficeon_private.l1_table[index];
^1da177e4c3f41 Linus Torvalds 2005-04-16 214 BUG_ON(page);
^1da177e4c3f41 Linus Torvalds 2005-04-16 215
^1da177e4c3f41 Linus Torvalds 2005-04-16 216 page = get_zeroed_page(GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 217 if (!page) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 218 efficeon_free_gatt_table(agp_bridge);
^1da177e4c3f41 Linus Torvalds 2005-04-16 219 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 220 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 221
^1da177e4c3f41 Linus Torvalds 2005-04-16 222 for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk)
6619a8fb594486 H. Peter Anvin 2007-10-17 223 clflush((char *)page+offset);
^1da177e4c3f41 Linus Torvalds 2005-04-16 224
^1da177e4c3f41 Linus Torvalds 2005-04-16 225 efficeon_private.l1_table[index] = page;
^1da177e4c3f41 Linus Torvalds 2005-04-16 226
6a12235c7d2d75 David Woodhouse 2009-07-29 227 value = virt_to_phys((unsigned long *)page) | pati | present | index;
^1da177e4c3f41 Linus Torvalds 2005-04-16 228
^1da177e4c3f41 Linus Torvalds 2005-04-16 229 pci_write_config_dword(agp_bridge->dev,
^1da177e4c3f41 Linus Torvalds 2005-04-16 230 EFFICEON_ATTPAGE, value);
^1da177e4c3f41 Linus Torvalds 2005-04-16 231 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 232
^1da177e4c3f41 Linus Torvalds 2005-04-16 233 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 234 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 235
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi! On Tue, 15 Jul 2025, kernel test robot wrote: > > All errors: > > drivers/char/agp/efficeon-agp.c: ... > Sorry, my "i386 compilation testing" was to do an allyesconfig, disable CONFIG_64BIT, then compile… This — now I embarrasingly discover — does not enable the kconfig options that depend on X86_32=y; e.g., the CONFIG_AGP_EFFICEON case above. It seems that, kinda like cross compilation, an "ARCH=i386" environment variable should do the job well with allyesconfig and the rest. I'll make sure that all future CPUID work passes that step before sending it mainline. Thanks a lot, -- Ahmed S. Darwish Linutronix GmbH
© 2016 - 2026 Red Hat, Inc.