From: Bjorn Helgaas <helgaas@kernel.org>
To: Kishon Vijay Abraham I <kishon@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Joao Pinto <Joao.Pinto@synopsys.com>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
hch@infradead.org, nsekhar@ti.com
Subject: Re: [PATCH v7 01/23] PCI: endpoint: Add EP core layer to enable EP controller and EP functions
Date: Tue, 13 Dec 2022 17:44:42 -0600 [thread overview]
Message-ID: <20221213234442.GA219721@bhelgaas> (raw)
In-Reply-To: <20170410135510.30673-1-kishon@ti.com>
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
parent reply other threads:[~2022-12-13 23:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20170410135510.30673-1-kishon@ti.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221213234442.GA219721@bhelgaas \
--to=helgaas@kernel.org \
--cc=Joao.Pinto@synopsys.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=hch@infradead.org \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=nsekhar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox