[rmk-arm:cex7 188/188] drivers/bus/fsl-mc/fsl-mc-bus.c:169:44: error: no member named 'iommu_fwnode' in 'struct iommu_fwspec'

From: kernel test robot
Date: Wed Dec 29 2021 - 08:07:29 EST


tree: git://git.armlinux.org.uk/~rmk/linux-arm cex7
head: ddd00596d29349aec223615c42a6986f5e3ca509
commit: ddd00596d29349aec223615c42a6986f5e3ca509 [188/188] bus: fsl-mc: add custom .dma_configure implementation
config: arm-randconfig-c002-20211228 (https://download.01.org/0day-ci/archive/20211229/202112292120.VAwsCiNc-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project cd284b7ac0615afc6e0f1a30da2777e361de27a3)
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
git remote add rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags rmk-arm cex7
git checkout ddd00596d29349aec223615c42a6986f5e3ca509
# 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=arm SHELL=/bin/bash drivers/bus/fsl-mc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/bus/fsl-mc/fsl-mc-bus.c:169:44: error: no member named 'iommu_fwnode' in 'struct iommu_fwspec'
iommu_ops = iommu_ops_from_fwnode(fwspec->iommu_fwnode);
~~~~~~ ^
drivers/bus/fsl-mc/fsl-mc-bus.c:173:39: error: no member named 'iommu_fwnode' in 'struct iommu_fwspec'
ret = iommu_fwspec_init(dev, fwspec->iommu_fwnode, iommu_ops);
~~~~~~ ^
>> drivers/bus/fsl-mc/fsl-mc-bus.c:184:9: error: implicit declaration of function 'iommu_probe_device' [-Werror,-Wimplicit-function-declaration]
ret = iommu_probe_device(dev);
^
3 errors generated.


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@xxxxxxxxxxxx