tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git asm-generic-fixes head: cdfde8f61a004fa5797d40581077603c142adca1 commit: cdfde8f61a004fa5797d40581077603c142adca1 [1/1] asm-generic: correct reference to GENERIC_LIB_DEVMEM_IS_ALLOWED config: arm-buildonly-randconfig-r003-20220707 (https://download.01.org/0day-ci/archive/20220708/202207080855.lobMzAgr-lkp@xxxxxxxxx/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 66ae1d60bb278793fd651cece264699d522bab84) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=cdfde8f61a004fa5797d40581077603c142adca1 git remote add arnd-asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git git fetch --no-tags arnd-asm-generic asm-generic-fixes git checkout cdfde8f61a004fa5797d40581077603c142adca1 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> kernel/resource.c:1124:6: error: call to undeclared function 'devmem_is_allowed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (devmem_is_allowed(PHYS_PFN(res->start)) && ^ 1 error generated. vim +/devmem_is_allowed +1124 kernel/resource.c 71a1d8ed900f8c Daniel Vetter 2020-11-27 1102 71a1d8ed900f8c Daniel Vetter 2020-11-27 1103 #ifdef CONFIG_IO_STRICT_DEVMEM 71a1d8ed900f8c Daniel Vetter 2020-11-27 1104 static void revoke_iomem(struct resource *res) 71a1d8ed900f8c Daniel Vetter 2020-11-27 1105 { 71a1d8ed900f8c Daniel Vetter 2020-11-27 1106 /* pairs with smp_store_release() in iomem_init_inode() */ 71a1d8ed900f8c Daniel Vetter 2020-11-27 1107 struct inode *inode = smp_load_acquire(&iomem_inode); 71a1d8ed900f8c Daniel Vetter 2020-11-27 1108 71a1d8ed900f8c Daniel Vetter 2020-11-27 1109 /* 71a1d8ed900f8c Daniel Vetter 2020-11-27 1110 * Check that the initialization has completed. Losing the race 71a1d8ed900f8c Daniel Vetter 2020-11-27 1111 * is ok because it means drivers are claiming resources before 71a1d8ed900f8c Daniel Vetter 2020-11-27 1112 * the fs_initcall level of init and prevent iomem_get_mapping users 71a1d8ed900f8c Daniel Vetter 2020-11-27 1113 * from establishing mappings. 71a1d8ed900f8c Daniel Vetter 2020-11-27 1114 */ 71a1d8ed900f8c Daniel Vetter 2020-11-27 1115 if (!inode) 71a1d8ed900f8c Daniel Vetter 2020-11-27 1116 return; 71a1d8ed900f8c Daniel Vetter 2020-11-27 1117 71a1d8ed900f8c Daniel Vetter 2020-11-27 1118 /* 71a1d8ed900f8c Daniel Vetter 2020-11-27 1119 * The expectation is that the driver has successfully marked 71a1d8ed900f8c Daniel Vetter 2020-11-27 1120 * the resource busy by this point, so devmem_is_allowed() 71a1d8ed900f8c Daniel Vetter 2020-11-27 1121 * should start returning false, however for performance this 71a1d8ed900f8c Daniel Vetter 2020-11-27 1122 * does not iterate the entire resource range. 71a1d8ed900f8c Daniel Vetter 2020-11-27 1123 */ 71a1d8ed900f8c Daniel Vetter 2020-11-27 @1124 if (devmem_is_allowed(PHYS_PFN(res->start)) && 71a1d8ed900f8c Daniel Vetter 2020-11-27 1125 devmem_is_allowed(PHYS_PFN(res->end))) { 71a1d8ed900f8c Daniel Vetter 2020-11-27 1126 /* 71a1d8ed900f8c Daniel Vetter 2020-11-27 1127 * *cringe* iomem=relaxed says "go ahead, what's the 71a1d8ed900f8c Daniel Vetter 2020-11-27 1128 * worst that can happen?" 71a1d8ed900f8c Daniel Vetter 2020-11-27 1129 */ 71a1d8ed900f8c Daniel Vetter 2020-11-27 1130 return; 71a1d8ed900f8c Daniel Vetter 2020-11-27 1131 } 71a1d8ed900f8c Daniel Vetter 2020-11-27 1132 71a1d8ed900f8c Daniel Vetter 2020-11-27 1133 unmap_mapping_range(inode->i_mapping, res->start, resource_size(res), 1); 71a1d8ed900f8c Daniel Vetter 2020-11-27 1134 } 71a1d8ed900f8c Daniel Vetter 2020-11-27 1135 #else 71a1d8ed900f8c Daniel Vetter 2020-11-27 1136 static void revoke_iomem(struct resource *res) {} 71a1d8ed900f8c Daniel Vetter 2020-11-27 1137 #endif 71a1d8ed900f8c Daniel Vetter 2020-11-27 1138 :::::: The code at line 1124 was first introduced by commit :::::: 71a1d8ed900f8cf53151beff17e3e2ff8e9283a1 resource: Move devmem revoke code to resource framework :::::: TO: Daniel Vetter <daniel.vetter@xxxxxxxx> :::::: CC: Daniel Vetter <daniel.vetter@xxxxxxxx> -- 0-DAY CI Kernel Test Service https://01.org/lkp