linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: David Epping <david.epping@missinglinkelectronics.com>
Cc: linux-arm-kernel@lists.infradead.org,
	"Dinh Nguyen" <dinguyen@kernel.org>,
	"Ley Foon Tan" <ley.foon.tan@intel.com>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Zhichang Yuan" <yuanzhichang@hisilicon.com>,
	"Gabriele Paoloni" <gabriele.paoloni@huawei.com>,
	"John Garry" <john.garry@huawei.com>,
	"Joyce Ooi" <joyce.ooi@intel.com>
Subject: Re: arm: mach-socfpga: PCIe Root IO TLP support for Cyclone V
Date: Fri, 3 Nov 2023 13:43:48 -0500	[thread overview]
Message-ID: <20231103184348.GA162150@bhelgaas> (raw)
In-Reply-To: <ZUDd04c7FXUeusxK@nucnuc.mle>

[+cc Zhichang, Gabriele, John (INDIRECT_PIO); Joyce (altera maintainer)]

On Tue, Oct 31, 2023 at 11:58:27AM +0100, David Epping wrote:
> Hello ARM PCIe and especially Intel Altera SOCFPGA maintainers,
> 
> the Intel Altera Cyclone V PCIe Root Complex drivers afaik currently
> don’t support sending IO TLPs.  The Root Complex IP Core, seemingly
> unlike many other ARM Root Complexes, does not offer a memory
> mapping for the IO address space, but instead relies on indirect
> addressing via address and data registers. To my knowledge this IO
> space access has not been implemented in Linux, yet, and is
> currently only used for PCIe Configuration TLPs on this hardware,
> which use the same mechanism.
> 
> To support an AX99100 endpoint (which requires IO BARs for some of
> its features) connected to a Cyclone V PCIe root, we added support
> for IO TLPs to Kernels 4.14, 5.4, and 5.15.  For your reference the
> 4.14 patches are attached. They do _not_ apply to current mainline
> Linux and are meant to give you an idea of our current approach.  As
> you can see, in order to implement our own inb() and outb() family
> of functions, we had to remove multi-platform support for
> ARCH_SOCFPGA.
> 
> I would like to get some feedback on:
>
> a) Are you interested in adding IO TLP support for this FPGA/CPU to
> mainline? We would implement patches for the current mainline in
> that case and post them for discussion.
>
> b) Do you see an option to implement the IO space access functions
> without dropping multi-platform support? Is that a prerequisite for
> going mainline?

I don't understand INDIRECT_PIO very well, but does it help with this
at all?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/Kconfig?id=v6.6#n92
https://git.kernel.org/linus/031e3601869c

Beginning of thread, including full patch (for v4.14, not current
kernel) at: https://lore.kernel.org/all/ZUDd04c7FXUeusxK@nucnuc.mle/

Bjorn

  reply	other threads:[~2023-11-03 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 10:58 arm: mach-socfpga: PCIe Root IO TLP support for Cyclone V David Epping
2023-11-03 18:43 ` Bjorn Helgaas [this message]
2023-11-06 13:08   ` David Epping
2023-11-05 11:20 ` David Laight
2023-11-06  8:56   ` David Laight
2023-11-06 10:15   ` David Epping
2023-11-06 11:02     ` David Laight

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=20231103184348.GA162150@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=david.epping@missinglinkelectronics.com \
    --cc=dinguyen@kernel.org \
    --cc=gabriele.paoloni@huawei.com \
    --cc=john.garry@huawei.com \
    --cc=joyce.ooi@intel.com \
    --cc=kw@linux.com \
    --cc=ley.foon.tan@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=yuanzhichang@hisilicon.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;
as well as URLs for NNTP newsgroup(s).