tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 81a41d2ac1de43215c014bc71d907a026042e55b commit: ab331ac5b797eb3889777f3d8d98a86069c5720e [14108/14122] arm64/mpam: Check mpam_detect_is_enabled() before accessing MPAM registers config: arm64-randconfig-001-20240925 (https://download.01.org/0day-ci/archive/20240925/202409252253.TKzwXzes-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240925/202409252253.TKzwXzes-lkp@i...)
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/202409252253.TKzwXzes-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/arm64/kernel/cpufeature.c:2313:6: error: redefinition of 'mpam_detect_is_enabled'
2313 | bool mpam_detect_is_enabled(void) | ^~~~~~~~~~~~~~~~~~~~~~ In file included from arch/arm64/include/asm/ptrace.h:11, from arch/arm64/include/asm/irqflags.h:10, from include/linux/irqflags.h:17, from include/linux/rcupdate.h:26, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from include/linux/sched/task_stack.h:9, from include/linux/elfcore.h:7, from include/linux/crash_core.h:6, from include/linux/kexec.h:18, from include/linux/crash_dump.h:5, from arch/arm64/kernel/cpufeature.c:67: arch/arm64/include/asm/cpufeature.h:864:20: note: previous definition of 'mpam_detect_is_enabled' with type 'bool(void)' {aka '_Bool(void)'} 864 | static inline bool mpam_detect_is_enabled(void) | ^~~~~~~~~~~~~~~~~~~~~~ arch/arm64/kernel/cpufeature.c:2133:13: warning: 'enable_pseudo_nmi' defined but not used [-Wunused-variable] 2133 | static bool enable_pseudo_nmi; | ^~~~~~~~~~~~~~~~~
vim +/mpam_detect_is_enabled +2313 arch/arm64/kernel/cpufeature.c
2311 2312 static bool __read_mostly mpam_force_enabled;
2313 bool mpam_detect_is_enabled(void)
2314 { 2315 return mpam_force_enabled; 2316 } 2317