[arm:cex7 91/91] drivers/bus/fsl-mc/fsl-mc-bus.c:169:49: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'

kernel test robot lkp at intel.com
Tue Nov 2 11:05:16 PDT 2021


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head:   b188bc01cdb143efe833fad197daa92e86887e42
commit: b188bc01cdb143efe833fad197daa92e86887e42 [91/91] bus: fsl-mc: add custom .dma_configure implementation
config: powerpc-randconfig-r022-20211101 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.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 b188bc01cdb143efe833fad197daa92e86887e42
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/bus/fsl-mc/

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:169:49: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'
     169 |         iommu_ops = iommu_ops_from_fwnode(fwspec->iommu_fwnode);
         |                                                 ^~
   drivers/bus/fsl-mc/fsl-mc-bus.c:173:44: error: 'struct iommu_fwspec' has no member named 'iommu_fwnode'
     173 |         ret = iommu_fwspec_init(dev, fwspec->iommu_fwnode, iommu_ops);
         |                                            ^~
>> drivers/bus/fsl-mc/fsl-mc-bus.c:184:23: error: implicit declaration of function 'iommu_probe_device'; did you mean 'iommu_detach_device'? [-Werror=implicit-function-declaration]
     184 |                 ret = iommu_probe_device(dev);
         |                       ^~~~~~~~~~~~~~~~~~
         |                       iommu_detach_device
   cc1: some warnings being treated as errors


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

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

---
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: 48096 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211103/92a7c099/attachment-0001.gz>


More information about the linux-arm-kernel mailing list