public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v7 01/23] PCI: endpoint: Add EP core layer to enable EP controller and EP functions
       [not found] <20170410135510.30673-1-kishon@ti.com>
@ 2022-12-13 23:44 ` Bjorn Helgaas
  0 siblings, 0 replies; only message in thread
From: Bjorn Helgaas @ 2022-12-13 23:44 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Bjorn Helgaas, Joao Pinto, linux-pci, linux-doc, linux-kernel,
	devicetree, linux-omap, linux-arm-kernel, hch, nsekhar

On Mon, Apr 10, 2017 at 07:25:10PM +0530, Kishon Vijay Abraham I wrote:
> Introduce a new EP core layer in order to support endpoint functions in
> linux kernel. This comprises the EPC library (Endpoint Controller Library)
> and EPF library (Endpoint Function Library). EPC library implements
> functions specific to an endpoint controller and EPF library implements
> functions specific to an endpoint function.

> +void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar)
> +{
> +	void *space;
> +	struct device *dev = &epf->dev;
> +	dma_addr_t phys_addr;
> +
> +	if (size < 128)
> +		size = 128;
> +	size = roundup_pow_of_two(size);
> +
> +	space = dma_alloc_coherent(dev, size, &phys_addr, GFP_KERNEL);
> +	if (!space) {
> +		dev_err(dev, "failed to allocate mem space\n");
> +		return NULL;
> +	}
> +
> +	epf->bar[bar].phys_addr = phys_addr;

> + * struct pci_epf_bar - represents the BAR of EPF device
> + * @phys_addr: physical address that should be mapped to the BAR
> + * @size: the size of the address space present in BAR
> + */
> +struct pci_epf_bar {
> +	dma_addr_t	phys_addr;

If this "phys_addr" is an address that can appear on the PCI bus, is
"phys_addr" a misnomer?  Many drivers use dma, dmabuf, bus_addr, etc.

Bjorn

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-13 23:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170410135510.30673-1-kishon@ti.com>
2022-12-13 23:44 ` [PATCH v7 01/23] PCI: endpoint: Add EP core layer to enable EP controller and EP functions Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox