tree: https://github.com/jgunthorpe/linux vfio_iommufd head: c639c250f6f5b991f23efa0e76fe5ca689eae450 commit: 1c427484d7893bd7aef1b024da0e5dc526bfe8f4 [7/26] iommufd: PFN handling for iopt_pages config: s390-allmodconfig compiler: s390-linux-gcc (GCC) 12.1.0 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 # https://github.com/jgunthorpe/linux/commit/1c427484d7893bd7aef1b024da0e5dc526bfe8f4 git remote add jgunthorpe https://github.com/jgunthorpe/linux git fetch --no-tags jgunthorpe vfio_iommufd git checkout 1c427484d7893bd7aef1b024da0e5dc526bfe8f4 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/iommu/iommufd/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot Note: the jgunthorpe/vfio_iommufd HEAD c639c250f6f5b991f23efa0e76fe5ca689eae450 builds fine. It only hurts bisectability. All errors (new ones prefixed by >>): drivers/iommu/iommufd/pages.c: In function 'copy_data_page': >> drivers/iommu/iommufd/pages.c:426:21: error: 'IOMMUFD_ACCESS_RW_WRITE' undeclared (first use in this function) 426 | if (flags & IOMMUFD_ACCESS_RW_WRITE) { | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:426:21: note: each undeclared identifier is reported only once for each function it appears in drivers/iommu/iommufd/pages.c: At top level: drivers/iommu/iommufd/pages.c:751:12: warning: 'pfn_reader_first' defined but not used [-Wunused-function] 751 | static int pfn_reader_first(struct pfn_reader *pfns, struct iopt_pages *pages, | ^~~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:688:12: warning: 'pfn_reader_seek_hole' defined but not used [-Wunused-function] 688 | static int pfn_reader_seek_hole(struct pfn_reader *pfns, | ^~~~~~~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:660:13: warning: 'pfn_reader_done' defined but not used [-Wunused-function] 660 | static bool pfn_reader_done(struct pfn_reader *pfns) | ^~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:513:12: warning: 'update_pinned' defined but not used [-Wunused-function] 513 | static int update_pinned(struct iopt_pages *pages) | ^~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:435:22: warning: 'batch_rw' defined but not used [-Wunused-function] 435 | static unsigned long batch_rw(struct pfn_batch *batch, void *data, | ^~~~~~~~ drivers/iommu/iommufd/pages.c:369:13: warning: 'batch_to_pages' defined but not used [-Wunused-function] 369 | static void batch_to_pages(struct pfn_batch *batch, struct page **pages) | ^~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:334:12: warning: 'batch_to_xarray' defined but not used [-Wunused-function] 334 | static int batch_to_xarray(struct pfn_batch *batch, struct xarray *xa, | ^~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:265:12: warning: 'batch_to_domain' defined but not used [-Wunused-function] 265 | static int batch_to_domain(struct pfn_batch *batch, struct iommu_domain *domain, | ^~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:200:13: warning: 'batch_init_backup' defined but not used [-Wunused-function] 200 | static void batch_init_backup(struct pfn_batch *batch, size_t max_pages, | ^~~~~~~~~~~~~~~~~ drivers/iommu/iommufd/pages.c:121:22: warning: 'iopt_area_index_to_iova_last' defined but not used [-Wunused-function] 121 | static unsigned long iopt_area_index_to_iova_last(struct iopt_area *area, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/IOMMUFD_ACCESS_RW_WRITE +426 drivers/iommu/iommufd/pages.c 419 420 static void copy_data_page(struct page *page, void *data, unsigned long offset, 421 size_t length, unsigned int flags) 422 { 423 void *mem; 424 425 mem = kmap_local_page(page); > 426 if (flags & IOMMUFD_ACCESS_RW_WRITE) { 427 memcpy(mem + offset, data, length); 428 set_page_dirty_lock(page); 429 } else { 430 memcpy(data, mem + offset, length); 431 } 432 kunmap_local(mem); 433 } 434 -- 0-DAY CI Kernel Test Service https://01.org/lkp