[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170208184945.GR16878@collabora.com>
Date: Wed, 8 Feb 2017 19:49:45 +0100
From: Peter Senna Tschudin <peter.senna@...labora.com>
To: Romain Perier <romain.perier@...labora.com>
Cc: Dan Williams <dan.j.williams@...el.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
jeffrey.t.kirsher@...el.com,
"David S. Miller" <davem@...emloft.net>, stas.yakovlev@...il.com,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Peter Senna Tschudin <peter.senna@...labora.co.uk>
Subject: Re: [RFC 18/19] PCI: Remove PCI pool macro functions
On Wed, Feb 08, 2017 at 05:34:56PM +0100, Romain Perier wrote:
> Now that all the drivers use dma pool API, we can remove the macro
> functions for PCI pool.
Good news: make allyesconfig;make succeed after the changes until this
point, but:
$ grep -R pci_pool
...
drivers/usb/gadget/udc/pch_udc.c: * -ENOMEM: pci_pool_alloc
invocation fails
drivers/usb/host/oxu210hp-hcd.c: * pci_pool consistent memory
always uses segment zero.
drivers/usb/host/fotg210-hcd.c: * pci_pool consistent memory always
uses segment zero.
drivers/usb/host/ehci-hcd.c: * pci_pool consistent memory always
uses segment zero.
drivers/scsi/lpfc/lpfc_mem.c: * Allocates from generic pci_pool_alloc
function first and if that fails and
drivers/scsi/csiostor/csio_init.c: hw->scsi_pci_pool =
dma_pool_create("csio_scsi_pci_pool", &hw->pdev->dev,
drivers/scsi/csiostor/csio_init.c: if (!hw->scsi_pci_pool)
drivers/scsi/csiostor/csio_init.c:
dma_pool_destroy(hw->scsi_pci_pool);
drivers/scsi/csiostor/csio_init.c: hw->scsi_pci_pool = NULL;
drivers/scsi/csiostor/csio_scsi.c: dma_buf->vaddr =
dma_pool_alloc(hw->scsi_pci_pool, GFP_KERNEL,
drivers/scsi/csiostor/csio_scsi.c:
dma_pool_free(hw->scsi_pci_pool, dma_buf->vaddr,
drivers/scsi/csiostor/csio_scsi.c:
dma_pool_free(scm->hw->scsi_pci_pool, dma_buf->vaddr,
drivers/scsi/csiostor/csio_hw.h: struct dma_pool
*scsi_pci_pool; /* PCI pool for SCSI */
this can be updated or removed, needs to check:
scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
>
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
> include/linux/pci.h | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 11d15d4..c3a93e4 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1284,15 +1284,6 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
> #include <linux/pci-dma.h>
> #include <linux/dmapool.h>
>
> -#define pci_pool dma_pool
> -#define pci_pool_create(name, pdev, size, align, allocation) \
> - dma_pool_create(name, &pdev->dev, size, align, allocation)
> -#define pci_pool_destroy(pool) dma_pool_destroy(pool)
> -#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
> -#define pci_pool_zalloc(pool, flags, handle) \
> - dma_pool_zalloc(pool, flags, handle)
> -#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
> -
> struct msix_entry {
> u32 vector; /* kernel uses to write allocated vector */
> u16 entry; /* driver uses to specify entry, OS writes */
> --
> 2.9.3
>
Powered by blists - more mailing lists