[arm:cex7 50/50] drivers/bus/fsl-mc/fsl-mc-bus.c:166:42: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'

kernel test robot lkp at intel.com
Thu Jun 3 08:53:32 PDT 2021


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head:   96992e320b327d2a1b100aee51c366ca0747321b
commit: 96992e320b327d2a1b100aee51c366ca0747321b [50/50] bus: fsl-mc: add custom .dma_configure implementation
config: arm-randconfig-r003-20210603 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
        git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
        git fetch --no-tags arm cex7
        git checkout 96992e320b327d2a1b100aee51c366ca0747321b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/bus/fsl-mc/fsl-mc-bus.c: In function 'fsl_mc_dma_configure':
>> drivers/bus/fsl-mc/fsl-mc-bus.c:166:42: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'
     166 |  iommu_ops = iommu_ops_from_fwnode(fwspec->iommu_fwnode);
         |                                          ^~
   drivers/bus/fsl-mc/fsl-mc-bus.c:170:37: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'
     170 |  ret = iommu_fwspec_init(dev, fwspec->iommu_fwnode, iommu_ops);
         |                                     ^~
>> drivers/bus/fsl-mc/fsl-mc-bus.c:181:9: error: implicit declaration of function 'iommu_probe_device'; did you mean 'iommu_detach_device'? [-Werror=implicit-function-declaration]
     181 |   ret = iommu_probe_device(dev);
         |         ^~~~~~~~~~~~~~~~~~
         |         iommu_detach_device
   cc1: some warnings being treated as errors


vim +166 drivers/bus/fsl-mc/fsl-mc-bus.c

   136	
   137	static int fsl_mc_dma_configure(struct device *dev)
   138	{
   139		struct device *dma_dev = dev;
   140		struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
   141		u32 input_id = mc_dev->icid;
   142		struct iommu_fwspec *fwspec;
   143		const struct iommu_ops *iommu_ops;
   144		int ret;
   145	
   146		/* Skip DMA setup for devices that are not DMA masters */
   147		if (dev->type == &fsl_mc_bus_dpmcp_type ||
   148		    dev->type == &fsl_mc_bus_dpbp_type ||
   149		    dev->type == &fsl_mc_bus_dpcon_type ||
   150		    dev->type == &fsl_mc_bus_dpio_type)
   151			return 0;
   152	
   153		while (dev_is_fsl_mc(dma_dev))
   154			dma_dev = dma_dev->parent;
   155	
   156	
   157	#if 0
   158		if (dev_of_node(dma_dev))
   159			return of_dma_configure_id(dev, dma_dev->of_node, 0, &input_id);
   160	
   161		return acpi_dma_configure_id(dev, DEV_DMA_COHERENT, &input_id);
   162	#else
   163		fwspec = dev_iommu_fwspec_get(dma_dev);
   164		if (!fwspec)
   165			return -ENODEV;
 > 166		iommu_ops = iommu_ops_from_fwnode(fwspec->iommu_fwnode);
   167		if (!iommu_ops)
   168			return -ENODEV;
   169	
   170		ret = iommu_fwspec_init(dev, fwspec->iommu_fwnode, iommu_ops);
   171		if (ret)
   172			return ret;
   173	
   174		ret = iommu_fwspec_add_ids(dev, &input_id, 1);
   175		if (ret) {
   176			iommu_fwspec_free(dev);
   177			return ret;
   178		}
   179	
   180		if (!device_iommu_mapped(dev)) {
 > 181			ret = iommu_probe_device(dev);
   182			if (ret) {
   183				iommu_fwspec_free(dev);
   184				return ret;
   185			}
   186		}
   187	
   188		arch_setup_dma_ops(dev, 0, *dma_dev->dma_mask + 1, iommu_ops, true);
   189	
   190		return 0;
   191	#endif
   192	}
   193	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 22991 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210603/51ac2475/attachment-0001.gz>


More information about the linux-arm-kernel mailing list