Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [Query] : PCIe - Endpoint Function
Date: Fri, 11 Oct 2019 14:37:44 +0100
Message-ID: <CA+V-a8vR+xar-TsTOiBtNfbYuP8Wb_ktuf-i7tOkQ+==rs7Rug@mail.gmail.com> (raw)
In-Reply-To: <CA+V-a8tFB=giGvcLNhfTaaQ-R8svXijcoQ_QUdRMX3Hb4Ur95Q@mail.gmail.com>

Hi Kishon

On Fri, Oct 11, 2019 at 8:35 AM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
>
> Hi Kishon,
>
> On Thu, Oct 10, 2019 at 12:32 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
> >
> > Hi Prabhakar,
> >
> > On 10/10/19 4:57 PM, Lad, Prabhakar wrote:
> > > Hello,
> > >
> > > I am currently working on adding pcie-endpoint support for a
> > > controller, this controller doesn't support outbound- inbound address
> > > translations, it has 1-1 mapping between the CPU and PCI addresses,
> > > the current endpoint framework is based on  outbound-inbound
> > > translations, what is the best approach to add this support, or is
> > > there any WIP already for it ?
> >
> > How will the endpoint access host buffer without outbound ATU? I assume the PCI
> > address reserved for endpoint is not the full 32-bit or 64-bit address space?
> > In that case, the endpoint cannot directly access the host buffer (unless the
> > host already knows the address space of the endpoint and gives the endpoint an
> > address in its OB address space).
> >
I lied in my previous mail.

a] The controller needs the cpu_address before starting the link, ie
with the current implementation,the bars physical address in endpoint
are assigned
using dma_alloc_coherent(), but I what I actually want here is the
phys_addr returned by pci_epc_mem_alloc_addr().

b] In the pci_endpoint_test driver, the pci_address sent to the
endpoint driver is again dma_alloc_coherent(), but the address which I
actually want to
send to endpoint is the BAR's assigned regions in the RC.

Cheers,
--Prabhakar

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 11:27 Lad, Prabhakar
2019-10-10 11:32 ` Kishon Vijay Abraham I
2019-10-11  7:35   ` Lad, Prabhakar
2019-10-11 13:37     ` Lad, Prabhakar [this message]
2019-10-15  7:52       ` Kishon Vijay Abraham I
2019-10-22  6:06         ` Lad, Prabhakar

Reply instructions:

You may reply publically 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='CA+V-a8vR+xar-TsTOiBtNfbYuP8Wb_ktuf-i7tOkQ+==rs7Rug@mail.gmail.com' \
    --to=prabhakar.csengg@gmail.com \
    --cc=kishon@ti.com \
    --cc=linux-pci@vger.kernel.org \
    /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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org linux-pci@archiver.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox