tree:
git://git.infradead.org/users/hch/misc.git dax-devirtualize
head: 80c5f0a323a2c0f58e936ac2be5b5a19e3d8dcfb
commit: 80c5f0a323a2c0f58e936ac2be5b5a19e3d8dcfb [7/7] dax: rename the virtual flag to
cached
config: x86_64-randconfig-a011-20211207
(
https://download.01.org/0day-ci/archive/20211208/202112082309.XAgtNCAF-lk...)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dax-devirtualize
git checkout 80c5f0a323a2c0f58e936ac2be5b5a19e3d8dcfb
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=x86_64 SHELL=/bin/bash fs/fuse/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> fs/fuse/virtio_fs.c:840:2: error: implicit declaration of
function 'set_dax_cached' [-Werror,-Wimplicit-function-declaration]
set_dax_cached(fs->dax_dev);
^
1 error generated.
vim +/set_dax_cached +840 fs/fuse/virtio_fs.c
782
783 static int virtio_fs_setup_dax(struct virtio_device *vdev, struct virtio_fs *fs)
784 {
785 struct virtio_shm_region cache_reg;
786 struct dev_pagemap *pgmap;
787 bool have_cache;
788
789 if (!IS_ENABLED(CONFIG_FUSE_DAX))
790 return 0;
791
792 /* Get cache region */
793 have_cache = virtio_get_shm_region(vdev, &cache_reg,
794 (u8)VIRTIO_FS_SHMCAP_ID_CACHE);
795 if (!have_cache) {
796 dev_notice(&vdev->dev, "%s: No cache capability\n", __func__);
797 return 0;
798 }
799
800 if (!devm_request_mem_region(&vdev->dev, cache_reg.addr, cache_reg.len,
801 dev_name(&vdev->dev))) {
802 dev_warn(&vdev->dev, "could not reserve region addr=0x%llx
len=0x%llx\n",
803 cache_reg.addr, cache_reg.len);
804 return -EBUSY;
805 }
806
807 dev_notice(&vdev->dev, "Cache len: 0x%llx @ 0x%llx\n",
cache_reg.len,
808 cache_reg.addr);
809
810 pgmap = devm_kzalloc(&vdev->dev, sizeof(*pgmap), GFP_KERNEL);
811 if (!pgmap)
812 return -ENOMEM;
813
814 pgmap->type = MEMORY_DEVICE_FS_DAX;
815
816 /* Ideally we would directly use the PCI BAR resource but
817 * devm_memremap_pages() wants its own copy in pgmap. So
818 * initialize a struct resource from scratch (only the start
819 * and end fields will be used).
820 */
821 pgmap->range = (struct range) {
822 .start = (phys_addr_t) cache_reg.addr,
823 .end = (phys_addr_t) cache_reg.addr + cache_reg.len - 1,
824 };
825 pgmap->nr_range = 1;
826
827 fs->window_kaddr = devm_memremap_pages(&vdev->dev, pgmap);
828 if (IS_ERR(fs->window_kaddr))
829 return PTR_ERR(fs->window_kaddr);
830
831 fs->window_phys_addr = (phys_addr_t) cache_reg.addr;
832 fs->window_len = (phys_addr_t) cache_reg.len;
833
834 dev_dbg(&vdev->dev, "%s: window kaddr 0x%px phys_addr 0x%llx len
0x%llx\n",
835 __func__, fs->window_kaddr, cache_reg.addr, cache_reg.len);
836
837 fs->dax_dev = alloc_dax(fs, &virtio_fs_dax_ops);
838 if (IS_ERR(fs->dax_dev))
839 return PTR_ERR(fs->dax_dev);
840 set_dax_cached(fs->dax_dev);
841 return
devm_add_action_or_reset(&vdev->dev, virtio_fs_cleanup_dax,
842 fs->dax_dev);
843 }
844
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org