public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Christian Bruel <christian.bruel@foss.st.com>
Cc: "Koichiro Den" <den@valinux.co.jp>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	"Frank Li" <Frank.Li@nxp.com>, "Kees Cook" <kees@kernel.org>,
	"Shin'ichiro Kawasaki" <shinichiro.kawasaki@wdc.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Bhanu Seshu Kumar Valluri" <bhanuseshukumar@gmail.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: pci-epf-test: Roll back BAR mapping when subrange setup fails
Date: Tue, 17 Mar 2026 10:24:11 +0100	[thread overview]
Message-ID: <abkdu_7n_lePaTIY@ryzen> (raw)
In-Reply-To: <017a4294-a5c0-4cea-a3d5-b95f8bf0d1bb@foss.st.com>

On Tue, Mar 17, 2026 at 10:13:52AM +0100, Christian Bruel wrote:
> 
> Tested-by: Christian Bruel <christian.bruel@foss.st.com>
> 
> with the DISABLE BAR dependency
> https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=endpoint&id=33642e9e36dc084e4fc9245a266c9843bc8303b9
> 
> I will need to update the pci_epc_features after the merge.

I don't think you should update pci_epc_features just to be able to test
the inbound submapping feature.

As I said before, I think a better option would to ensure that the test is
skipped instead of returning failure, for SoCs with too few inbound iATUs.

A real EPF driver (not the test driver), that wants to run on STM32, and
wants to use inbound submapping feature, can simply ensure that it does not
enable all BARs (the test driver obviously enables all BARs, since it wants
to test all BARs). That way, that EPF driver will be able to use multiple
iATUs for a single BAR (as required by this new feature).

This works because all BARs are disabled by default. An EPF driver has to
enable the BARs it wants to use. (E.g. nvmet-pci-epf only enables BAR0.)


> 
> A more general question: I don't understand why only the STM32 is impacted.
> It seems that all targets, even those with 6 IB iATU entries, should ensure
> that one BAR is disabled to handle subranges.

I can't speak for every SoC, but looking at dmesg:
rockchip-dw-pcie a40000000.pcie-ep: iATU: unroll T, 16 ob, 16 ib, align 64K, limit 8G

rk3588 has 16 inbound windows.

Probably most SoCs have more than 6 ib windows?


Kind regards,
Niklas

  reply	other threads:[~2026-03-17  9:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 14:02 [PATCH] PCI: endpoint: pci-epf-test: Roll back BAR mapping when subrange setup fails Koichiro Den
2026-03-16 14:36 ` Koichiro Den
2026-03-16 14:41   ` Koichiro Den
2026-03-16 16:19 ` Niklas Cassel
2026-03-17  2:57   ` Koichiro Den
2026-03-17  3:27     ` Manivannan Sadhasivam
2026-03-17  9:13     ` Christian Bruel
2026-03-17  9:24       ` Niklas Cassel [this message]
2026-03-17  9:55         ` Christian Bruel
2026-03-17 10:01           ` Christian Bruel
2026-03-17 10:12             ` Niklas Cassel
2026-03-17 10:29               ` Christian Bruel
2026-03-17 10:46                 ` Niklas Cassel
2026-03-17 15:14                   ` Koichiro Den
2026-03-18  8:02                     ` Christian Bruel
2026-03-18  8:35                       ` Christian Bruel
2026-03-18  8:58                         ` Niklas Cassel
2026-03-18 12:58                           ` Christian Bruel
2026-03-17 15:17           ` Koichiro Den
2026-03-17  9:59       ` Manivannan Sadhasivam
2026-03-17 10:02         ` Christian Bruel
2026-03-17 10:05         ` Niklas Cassel
2026-03-17 15:27 ` Bjorn Helgaas

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=abkdu_7n_lePaTIY@ryzen \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhanuseshukumar@gmail.com \
    --cc=christian.bruel@foss.st.com \
    --cc=den@valinux.co.jp \
    --cc=helgaas@kernel.org \
    --cc=kees@kernel.org \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=shinichiro.kawasaki@wdc.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