[arm:cex7 65/65] drivers/bus/fsl-mc/fsl-mc-bus.c:166:44: error: no member named 'iommu_fwnode' in 'struct iommu_fwspec'
kernel test robot
lkp at intel.com
Mon Feb 22 13:03:42 EST 2021
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head: 590858e9b845bb2fdb39c75d09a722fa75173446
commit: 590858e9b845bb2fdb39c75d09a722fa75173446 [65/65] bus: fsl-mc: add custom .dma_configure implementation
config: powerpc-randconfig-r026-20210222 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
git fetch --no-tags arm cex7
git checkout 590858e9b845bb2fdb39c75d09a722fa75173446
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
^
arch/powerpc/include/asm/io.h:537:62: note: expanded from macro '__do_outl'
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port);
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:211:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:213:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:215:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:217:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:219:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/bus/fsl-mc/fsl-mc-bus.c:15:
In file included from include/linux/of_address.h:7:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:221:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/bus/fsl-mc/fsl-mc-bus.c:166: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:170: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:181:9: error: implicit declaration of function 'iommu_probe_device' [-Werror,-Wimplicit-function-declaration]
ret = iommu_probe_device(dev);
^
12 warnings and 3 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for HOTPLUG_CPU
Depends on SMP && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
Selected by
- PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE && PM_SLEEP
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: 32342 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210223/a194e21a/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list