[PATCH v2 5/6] cpufeature: Include asm/elf.h for ELF_PLATFORM
From: Petr Pavlu
Date: Fri Sep 11 2026 - 10:48:14 EST
linux/cpufeature.h uses ELF_PLATFORM, which is defined in asm/elf.h. It
currently relies on that header being included indirectly through other
files, specifically, drivers/base/cpu.c gets it via linux/module.h ->
linux/elf.h.
Add the missing include in preparation for removing the linux/elf.h include
from linux/module.h.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202608151415.UAbFbpvE-lkp@xxxxxxxxx/
Signed-off-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
---
include/linux/cpufeature.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h
index 6aff540ee9e5..66027987e9d6 100644
--- a/include/linux/cpufeature.h
+++ b/include/linux/cpufeature.h
@@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/mod_devicetable.h>
#include <asm/cpufeature.h>
+#include <asm/elf.h>
/*
* Macros imported from <asm/cpufeature.h>:
--
2.55.0