Re: [PATCH 2/4] PCI: dwc: Add support for EP mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gustavo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on v4.17-rc5 next-20180514]
[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/Gustavo-Pimentel/Add-DesignWare-EP-support/20180515-072113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from drivers/pci/dwc/pcie-designware.h:19:0,
                    from drivers/pci/dwc/pcie-designware-ep.c:11:
   drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_init':
>> drivers/pci/dwc/pcie-designware-ep.c:415:37: error: 'BAR0' undeclared (first use in this function); did you mean 'BAR_0'?
     EPC_FEATURE_SET_BAR(epc->features, BAR0);
                                        ^
   include/linux/pci-epc.h:99:41: note: in definition of macro 'EPC_FEATURE_SET_BAR'
      (features |= (EPC_FEATURE_BAR_MASK & (bar << 1)))
                                            ^~~
   drivers/pci/dwc/pcie-designware-ep.c:415:37: note: each undeclared identifier is reported only once for each function it appears in
     EPC_FEATURE_SET_BAR(epc->features, BAR0);
                                        ^
   include/linux/pci-epc.h:99:41: note: in definition of macro 'EPC_FEATURE_SET_BAR'
      (features |= (EPC_FEATURE_BAR_MASK & (bar << 1)))
                                            ^~~

vim +415 drivers/pci/dwc/pcie-designware-ep.c

   334	
   335	int dw_pcie_ep_init(struct dw_pcie_ep *ep)
   336	{
   337		int ret;
   338		void *addr;
   339		struct pci_epc *epc;
   340		struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
   341		struct device *dev = pci->dev;
   342		struct device_node *np = dev->of_node;
   343	
   344		if (!pci->dbi_base || !pci->dbi_base2) {
   345			dev_err(dev, "dbi_base/dbi_base2 is not populated\n");
   346			return -EINVAL;
   347		}
   348	
   349		ret = of_property_read_u32(np, "num-ib-windows", &ep->num_ib_windows);
   350		if (ret < 0) {
   351			dev_err(dev, "unable to read *num-ib-windows* property\n");
   352			return ret;
   353		}
   354		if (ep->num_ib_windows > MAX_IATU_IN) {
   355			dev_err(dev, "invalid *num-ib-windows*\n");
   356			return -EINVAL;
   357		}
   358	
   359		ret = of_property_read_u32(np, "num-ob-windows", &ep->num_ob_windows);
   360		if (ret < 0) {
   361			dev_err(dev, "unable to read *num-ob-windows* property\n");
   362			return ret;
   363		}
   364		if (ep->num_ob_windows > MAX_IATU_OUT) {
   365			dev_err(dev, "invalid *num-ob-windows*\n");
   366			return -EINVAL;
   367		}
   368	
   369		ep->ib_window_map = devm_kzalloc(dev, sizeof(long) *
   370						 BITS_TO_LONGS(ep->num_ib_windows),
   371						 GFP_KERNEL);
   372		if (!ep->ib_window_map)
   373			return -ENOMEM;
   374	
   375		ep->ob_window_map = devm_kzalloc(dev, sizeof(long) *
   376						 BITS_TO_LONGS(ep->num_ob_windows),
   377						 GFP_KERNEL);
   378		if (!ep->ob_window_map)
   379			return -ENOMEM;
   380	
   381		addr = devm_kzalloc(dev, sizeof(phys_addr_t) * ep->num_ob_windows,
   382				    GFP_KERNEL);
   383		if (!addr)
   384			return -ENOMEM;
   385		ep->outbound_addr = addr;
   386	
   387		if (ep->ops->ep_init)
   388			ep->ops->ep_init(ep);
   389	
   390		epc = devm_pci_epc_create(dev, &epc_ops);
   391		if (IS_ERR(epc)) {
   392			dev_err(dev, "failed to create epc device\n");
   393			return PTR_ERR(epc);
   394		}
   395	
   396		ret = of_property_read_u8(np, "max-functions", &epc->max_functions);
   397		if (ret < 0)
   398			epc->max_functions = 1;
   399	
   400		ret = __pci_epc_mem_init(epc, ep->phys_base, ep->addr_size,
   401					 ep->page_size);
   402		if (ret < 0) {
   403			dev_err(dev, "Failed to initialize address space\n");
   404			return ret;
   405		}
   406	
   407		ep->msi_mem = pci_epc_mem_alloc_addr(epc, &ep->msi_mem_phys,
   408						     epc->mem->page_size);
   409		if (!ep->msi_mem) {
   410			dev_err(dev, "Failed to reserve memory for MSI\n");
   411			return -ENOMEM;
   412		}
   413	
   414		epc->features = EPC_FEATURE_NO_LINKUP_NOTIFIER;
 > 415		EPC_FEATURE_SET_BAR(epc->features, BAR0);

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux