public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Koichiro Den <den@valinux.co.jp>
Cc: vkoul@kernel.org, mani@kernel.org, Frank.Li@nxp.com,
	jingoohan1@gmail.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, robh@kernel.org, bhelgaas@google.com,
	kishon@kernel.org, jdmason@kudzu.us, allenbh@gmail.com,
	dmaengine@vger.kernel.org, linux-pci@vger.kernel.org,
	ntb@lists.linux.dev, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Manikanta Maddireddy <mmaddireddy@nvidia.com>
Subject: Re: [PATCH v6 0/8] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback
Date: Thu, 12 Feb 2026 11:26:59 +0100	[thread overview]
Message-ID: <aY2q80zeRKSRO21H@fedora> (raw)
In-Reply-To: <fblyz2hldxgqo2i7fywpgzuaqxzxsbavme7pfahj3uftgloeqq@pxeddjzm4sdj>

On Thu, Feb 12, 2026 at 12:26:49PM +0900, Koichiro Den wrote:
> On Wed, Feb 11, 2026 at 05:52:53PM +0100, Niklas Cassel wrote:
> 
> Thanks for the additional context.
> Even if we introduce the distinction between BAR_RESERVED and BAR_DISABLED,
> as I understand it, we currently lack a way to describe what actually
> resides behind a BAR_RESERVED region.
> 
> Perhaps extending pci_epc_bar_desc to describe what a reserved BAR
> contains (e.g. DMA register block) might allow us to handle this in a
> cleaner and more generic way. It would at least be cleaner than treating it
> as a quirk and hard-code the reserved BAR+offset+contents.

Yes, you are absolutely right.

Improving struct pci_epc_bar_desc to be able give more information about a
BAR_RESERVED BAR would be a next logical step.

If we take RK3588 as an example:
BAR4 offset 0x0 is eDMA registers.
BAR4 offset 0x2000 is ATU registers.
BAR4 offset 0x4000 is MSI-X table.
BAR4 offset 0x5000 is MSI-X PBA.


Many different SoCs have the MSI-X table in one of the BARs.

pci-epf-test always puts the MSI-X table in BAR0 (test_reg_bar), after the
pci_epf_test_reg registers.

On RK3588, this mostly works fine, e.g. the MSI-X test case in the
pci_endpoint_test selftest passes with the MSI-X table in BAR0, however,
e.g. dw_pcie_ep_raise_msix_irq_doorbell() does not work when the MSI-X
table is in BAR0. If I hack the pci-epf-test code to have the MSI-X table
in BAR4 (as it is by default), then dw_pcie_ep_raise_msix_irq_doorbell()
works fine.


This would however require an EPF driver to be able to get an EPC drivers'
"desired" MSI-X table and MSI-X PBA location, so that it could call
pci_epc_set_msix() with these "desired" locations.


I guess we would just need to add a new "get desired MSI-X location" API
in epc->ops. However, I have been too busy to work on this, so right now it
is only an idea. (Anyone with some spare cycles are free to implement it.)

I know for a fact that many other SoCs with the DWC PCIe EP controller have
the MSI-X table in one of the BARs by default, so this would also allow
them to use dw_pcie_ep_raise_msix_irq_doorbell(). (And would also allow us
to no longer force disable these BAR_RESERVED BARs, as the PCI endpoint
currently has no way to make use for these BAR_RESERVED BARs.)


Kind regards,
Niklas

  reply	other threads:[~2026-02-12 10:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 12:53 [PATCH v6 0/8] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback Koichiro Den
2026-02-09 12:53 ` [PATCH v6 1/8] dmaengine: dw-edma: Deassert emulated interrupts in the IRQ handler Koichiro Den
2026-02-09 16:05   ` Frank Li
2026-02-09 12:53 ` [PATCH v6 2/8] dmaengine: dw-edma: Cache per-channel IRQ and emulation doorbell offset Koichiro Den
2026-02-09 16:13   ` Frank Li
2026-02-10  1:48     ` Koichiro Den
2026-02-09 12:53 ` [PATCH v6 3/8] PCI: endpoint: Add auxiliary resource query API Koichiro Den
2026-02-09 15:59   ` Frank Li
2026-02-09 12:53 ` [PATCH v6 4/8] PCI: dwc: Record integrated eDMA register window Koichiro Den
2026-02-09 12:53 ` [PATCH v6 5/8] PCI: dwc: ep: Report integrated eDMA resources via EPC aux-resource API Koichiro Den
2026-02-09 12:53 ` [PATCH v6 6/8] PCI: endpoint: pci-epf-test: Don't free doorbell IRQ unless requested Koichiro Den
2026-02-09 15:57   ` Frank Li
2026-02-10  1:54     ` Koichiro Den
2026-02-10 12:36   ` Niklas Cassel
2026-02-10 13:54     ` Koichiro Den
2026-02-10 16:38       ` Niklas Cassel
2026-02-11 16:08         ` Koichiro Den
2026-02-09 12:53 ` [PATCH v6 7/8] PCI: endpoint: pci-ep-msi: Fix error unwind and prevent double alloc Koichiro Den
2026-02-09 15:53   ` Frank Li
2026-02-09 12:53 ` [PATCH v6 8/8] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback Koichiro Den
2026-02-09 15:51   ` Frank Li
2026-02-10  2:10     ` Koichiro Den
2026-02-10 15:16       ` Frank Li
2026-02-10 12:24 ` [PATCH v6 0/8] " Niklas Cassel
2026-02-10 14:07   ` Koichiro Den
2026-02-10 16:30     ` Niklas Cassel
2026-02-11 15:57       ` Koichiro Den
2026-02-11 16:52         ` Niklas Cassel
2026-02-12  3:26           ` Koichiro Den
2026-02-12 10:26             ` Niklas Cassel [this message]
2026-02-12 15:14               ` Koichiro Den
2026-02-12 15:38                 ` Niklas Cassel
2026-02-12 16:31         ` Koichiro Den

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=aY2q80zeRKSRO21H@fedora \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=allenbh@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=den@valinux.co.jp \
    --cc=dmaengine@vger.kernel.org \
    --cc=jdmason@kudzu.us \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=mmaddireddy@nvidia.com \
    --cc=ntb@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=vkoul@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
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