Re: [PATCH] dma-mapping: skip USB devices when configuring DMA during probe

From: kbuild test robot
Date: Thu Aug 03 2017 - 15:41:48 EST


Hi Johan,

[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on v4.13-rc3 next-20170803]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Johan-Hovold/dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe/20170804-014620
config: microblaze-mmu_defconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=microblaze

All errors (new ones prefixed by >>):

drivers/base/dma-mapping.o: In function `dma_configure':
>> drivers/base/dma-mapping.c:350: undefined reference to `usb_bus_type'
drivers/base/dma-mapping.o: In function `dma_deconfigure':
drivers/base/dma-mapping.c:377: undefined reference to `usb_bus_type'
net/sunrpc/stats.o: In function `rpc_print_iostats':
net/sunrpc/stats.c:206: undefined reference to `_GLOBAL_OFFSET_TABLE_'
scripts/link-vmlinux.sh: line 93: 76193 Segmentation fault ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${objects}

vim +350 drivers/base/dma-mapping.c

342
343 int dma_configure(struct device *dev)
344 {
345 struct device *bridge = NULL, *dma_dev = dev;
346 enum dev_dma_attr attr;
347 int ret = 0;
348
349 /* USB devices share the controller's mask. */
> 350 if (dev->bus == &usb_bus_type)
351 return 0;
352
353 if (dev_is_pci(dev)) {
354 bridge = pci_get_host_bridge_device(to_pci_dev(dev));
355 dma_dev = bridge;
356 if (IS_ENABLED(CONFIG_OF) && dma_dev->parent &&
357 dma_dev->parent->of_node)
358 dma_dev = dma_dev->parent;
359 }
360
361 if (dma_dev->of_node) {
362 ret = of_dma_configure(dev, dma_dev->of_node);
363 } else if (has_acpi_companion(dma_dev)) {
364 attr = acpi_get_dma_attr(to_acpi_device_node(dma_dev->fwnode));
365 if (attr != DEV_DMA_NOT_SUPPORTED)
366 ret = acpi_dma_configure(dev, attr);
367 }
368
369 if (bridge)
370 pci_put_host_bridge_device(bridge);
371
372 return ret;
373 }
374

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip