[pci:pci/peer-to-peer 1/2] drivers//pci/p2pdma.c:199:7: error: 'struct dev_pagemap' has no member named 'kill'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/peer-to-peer
head:   9e884ffa1d39eba6c8a5f52e94acdc6e20e5007a
commit: 56f0e2bc622a5f4750abfb8b4430c8dd46261673 [1/2] PCI/P2PDMA: Match interface changes to devm_memremap_pages()
config: x86_64-randconfig-e1-12091838 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 56f0e2bc622a5f4750abfb8b4430c8dd46261673
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//pci/p2pdma.c: In function 'pci_p2pdma_add_resource':
>> drivers//pci/p2pdma.c:199:7: error: 'struct dev_pagemap' has no member named 'kill'
     pgmap->kill = pci_p2pdma_percpu_kill;
          ^~

vim +199 drivers//pci/p2pdma.c

   152	
   153	/**
   154	 * pci_p2pdma_add_resource - add memory for use as p2p memory
   155	 * @pdev: the device to add the memory to
   156	 * @bar: PCI BAR to add
   157	 * @size: size of the memory to add, may be zero to use the whole BAR
   158	 * @offset: offset into the PCI BAR
   159	 *
   160	 * The memory will be given ZONE_DEVICE struct pages so that it may
   161	 * be used with any DMA request.
   162	 */
   163	int pci_p2pdma_add_resource(struct pci_dev *pdev, int bar, size_t size,
   164				    u64 offset)
   165	{
   166		struct dev_pagemap *pgmap;
   167		void *addr;
   168		int error;
   169	
   170		if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))
   171			return -EINVAL;
   172	
   173		if (offset >= pci_resource_len(pdev, bar))
   174			return -EINVAL;
   175	
   176		if (!size)
   177			size = pci_resource_len(pdev, bar) - offset;
   178	
   179		if (size + offset > pci_resource_len(pdev, bar))
   180			return -EINVAL;
   181	
   182		if (!pdev->p2pdma) {
   183			error = pci_p2pdma_setup(pdev);
   184			if (error)
   185				return error;
   186		}
   187	
   188		pgmap = devm_kzalloc(&pdev->dev, sizeof(*pgmap), GFP_KERNEL);
   189		if (!pgmap)
   190			return -ENOMEM;
   191	
   192		pgmap->res.start = pci_resource_start(pdev, bar) + offset;
   193		pgmap->res.end = pgmap->res.start + size - 1;
   194		pgmap->res.flags = pci_resource_flags(pdev, bar);
   195		pgmap->ref = &pdev->p2pdma->devmap_ref;
   196		pgmap->type = MEMORY_DEVICE_PCI_P2PDMA;
   197		pgmap->pci_p2pdma_bus_offset = pci_bus_address(pdev, bar) -
   198			pci_resource_start(pdev, bar);
 > 199		pgmap->kill = pci_p2pdma_percpu_kill;
   200	
   201		addr = devm_memremap_pages(&pdev->dev, pgmap);
   202		if (IS_ERR(addr)) {
   203			error = PTR_ERR(addr);
   204			goto pgmap_free;
   205		}
   206	
   207		error = gen_pool_add_virt(pdev->p2pdma->pool, (unsigned long)addr,
   208				pci_bus_address(pdev, bar) + offset,
   209				resource_size(&pgmap->res), dev_to_node(&pdev->dev));
   210		if (error)
   211			goto pgmap_free;
   212	
   213		pci_info(pdev, "added peer-to-peer DMA memory %pR\n",
   214			 &pgmap->res);
   215	
   216		return 0;
   217	
   218	pgmap_free:
   219		devm_kfree(&pdev->dev, pgmap);
   220		return error;
   221	}
   222	EXPORT_SYMBOL_GPL(pci_p2pdma_add_resource);
   223	

---
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]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux