Skip to contentSkip to conversation

./include/linux/cpufeature.h:30:33: error: 'ELF_PLATFORM' undeclared; did you mean 'AT_PLATFORM'?

DISCUSSION kernel test robot 1 participant 1 message Aug 15

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://github.com/intel-lab-lkp/linux/commits/Petr-Pavlu/x86-Avoid-indirect-includes-through-linux-module-h-linux-elf-h/20260814-084615
head:   3ccb9a11d8a060198e89ba5c32b6f2fa54da6d89
commit: 3ccb9a11d8a060198e89ba5c32b6f2fa54da6d89 module: Limit ELF includes in linux/module.h to uapi/linux/elf.h
date:   2 days ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260815/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260815/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from drivers/base/cpu.c:19:
drivers/base/cpu.c: In function 'print_cpu_modalias':

>> ./include/linux/cpufeature.h:30:33: error: 'ELF_PLATFORM' undeclared (first use in this function); did you mean 'AT_PLATFORM'?
      30 | #define CPU_FEATURE_TYPEVAL     ELF_PLATFORM
         |                                 ^~~~~~~~~~~~
   drivers/base/cpu.c:368:30: note: in expansion of macro 'CPU_FEATURE_TYPEVAL'
     368 |                              CPU_FEATURE_TYPEVAL);
         |                              ^~~~~~~~~~~~~~~~~~~
   ./include/linux/cpufeature.h:30:33: note: each undeclared identifier is reported only once for each function it appears in
      30 | #define CPU_FEATURE_TYPEVAL     ELF_PLATFORM
         |                                 ^~~~~~~~~~~~
   drivers/base/cpu.c:368:30: note: in expansion of macro 'CPU_FEATURE_TYPEVAL'
     368 |                              CPU_FEATURE_TYPEVAL);
         |                              ^~~~~~~~~~~~~~~~~~~

vim +30 ./include/linux/cpufeature.h

67bad2fdb754dbe Ard Biesheuvel 2014-02-08 28

67bad2fdb754dbe Ard Biesheuvel 2014-02-08  29  #ifndef CPU_FEATURE_TYPEVAL
67bad2fdb754dbe Ard Biesheuvel 2014-02-08 @30  #define CPU_FEATURE_TYPEVAL	ELF_PLATFORM
67bad2fdb754dbe Ard Biesheuvel 2014-02-08  31  #endif

67bad2fdb754dbe Ard Biesheuvel 2014-02-08 32

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki