public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: Christian Bruel <christian.bruel@foss.st.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: Koichiro Den <den@valinux.co.jp>, <jingoohan1@gmail.com>,
	<mani@kernel.org>, <lpieralisi@kernel.org>,
	<kwilczynski@kernel.org>, <robh@kernel.org>,
	<bhelgaas@google.com>, <Frank.Li@nxp.com>, <vigneshr@ti.com>,
	<s-vadapalli@ti.com>, <hongxing.zhu@nxp.com>,
	<l.stach@pengutronix.de>, <shawnguo@kernel.org>,
	<s.hauer@pengutronix.de>, <kernel@pengutronix.de>,
	<festevam@gmail.com>, <minghuan.Lian@nxp.com>,
	<mingkai.hu@nxp.com>, <roy.zang@nxp.com>,
	<jesper.nilsson@axis.com>, <heiko@sntech.de>,
	<srikanth.thokala@intel.com>, <marek.vasut+renesas@gmail.com>,
	<yoshihiro.shimoda.uh@renesas.com>, <geert+renesas@glider.be>,
	<magnus.damm@gmail.com>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@foss.st.com>, <thierry.reding@gmail.com>,
	<jonathanh@nvidia.com>, <hayashi.kunihiko@socionext.com>,
	<mhiramat@kernel.org>, <kishon@kernel.org>,
	<jirislaby@kernel.org>, <rongqianfeng@vivo.com>,
	<18255117159@163.com>, <shawn.lin@rock-chips.com>,
	<nicolas.frattaroli@collabora.com>, <linux.amoon@gmail.com>,
	<vidyas@nvidia.com>, <shuah@kernel.org>,
	<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <imx@lists.linux.dev>,
	<linuxppc-dev@lists.ozlabs.org>, <linux-arm-kernel@axis.com>,
	<linux-rockchip@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>,
	<linux-renesas-soc@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-tegra@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v10 3/8] PCI: dwc: Advertise dynamic inbound mapping support
Date: Mon, 16 Mar 2026 14:29:54 +0100	[thread overview]
Message-ID: <ba3ae9a0-11ba-4000-b2ed-08aeede0dc54@foss.st.com> (raw)
In-Reply-To: <abf-LKj8V2MpJFEE@ryzen>



On 3/16/26 13:57, Niklas Cassel wrote:
> On Mon, Mar 16, 2026 at 01:41:03PM +0100, Christian Bruel wrote:
>> Hi Koichiro,
>>
>>>
>>> If I understood the problem correctly, would something like the patch below
>>> address it? My expectation is that the subrange mapping test would then fail
>>> consistently on platforms that do not have enough free IB iATU regions.
>>>
>>
>> Thank you for your patch. Yes, now the bar subrange tests fail consistently,
>> so that is enough to say this is not a regression.
>>
>> However, I think there was a clear BAR missing somewhere before running the
>> tests in the EPF driver, as the BARs could be reallocated during the other
>> tests. This is not due to the subrange tests, but the EPF test driver
>> supposes a 1:1 BAR/ATU mapping. Now this assumption is broken. I'm wondering
>> if this could be improved to make the subrange tests pass on all platforms
> 
> Normally, you want one inbound iATU per enabled BAR, since you want the host
> to be able to access all the enabled BARs at any time.
> 
> If you are thinking that we should somehow temporarily disable inbound
> address translation for one of the enabled BARs, such that we can do "steal"
> that iATU to test inbound subrange mapping, then I think that is a bad idea.

yes, I was thinking something about restricting the iATU entry lifetime 
during the BAR test duration and restoring after. But OK I agree, not good.

> 
> I think we should just let the test fail. Possibly we could call some API that
> tells us that all inbound iATUs are occupied, and then SKIP instead of FAIL
> the inbound subrange test case.
> 
> If you really want to test/use inbound subrange mapping, even if your SoC has
> a very limited number of inbound iATUs, then I think a better solution is to
> mark one or multiple of your BARs as disabled:
> https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=endpoint&id=33642e9e36dc084e4fc9245a266c9843bc8303b9
> 
> Then you should have at least one more inbound iATU available, and should be
> able to run the inbound subrange test case.

Yes cherry-picking the BAR_DISABLED support, I can now test the subrange 
with Koichiro's fixup.

  ./pci_endpoint_test -t BAR_SUBRANGE_TEST
TAP version 13
1..6
# Starting 6 tests from 6 test cases.
#  RUN           pci_ep_bar.BAR0.BAR_SUBRANGE_TEST ...
#      SKIP      BAR is test register space
#            OK  pci_ep_bar.BAR0.BAR_SUBRANGE_TEST
ok 1 pci_ep_bar.BAR0.BAR_SUBRANGE_TEST # SKIP BAR is test register space
#  RUN           pci_ep_bar.BAR1.BAR_SUBRANGE_TEST ...
#            OK  pci_ep_bar.BAR1.BAR_SUBRANGE_TEST
ok 2 pci_ep_bar.BAR1.BAR_SUBRANGE_TEST
#  RUN           pci_ep_bar.BAR2.BAR_SUBRANGE_TEST ...
#            OK  pci_ep_bar.BAR2.BAR_SUBRANGE_TEST
ok 3 pci_ep_bar.BAR2.BAR_SUBRANGE_TEST
#  RUN           pci_ep_bar.BAR3.BAR_SUBRANGE_TEST ...
#      SKIP      BAR is disabled
#            OK  pci_ep_bar.BAR3.BAR_SUBRANGE_TEST
ok 4 pci_ep_bar.BAR3.BAR_SUBRANGE_TEST # SKIP BAR is disabled
#  RUN           pci_ep_bar.BAR4.BAR_SUBRANGE_TEST ...
#      SKIP      BAR is disabled
#            OK  pci_ep_bar.BAR4.BAR_SUBRANGE_TEST
ok 5 pci_ep_bar.BAR4.BAR_SUBRANGE_TEST # SKIP BAR is disabled
#  RUN           pci_ep_bar.BAR5.BAR_SUBRANGE_TEST ...
#      SKIP      BAR is disabled
#            OK  pci_ep_bar.BAR5.BAR_SUBRANGE_TEST
ok 6 pci_ep_bar.BAR5.BAR_SUBRANGE_TEST # SKIP BAR is disabled
# PASSED: 6 / 6 tests passed.
# 4 skipped test(s) detected. Consider enabling relevant config options 
to improve coverage.
# Totals: pass:2 fail:0 xfail:0 xpass:0 skip:4 error:0

Thank you,

Christian
> 
> 
> Kind regards,
> Niklas



  reply	other threads:[~2026-03-16 13:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-24 14:50 [PATCH v10 0/8] PCI: endpoint: BAR subrange mapping support Koichiro Den
2026-01-24 14:50 ` [PATCH v10 1/8] PCI: endpoint: Add dynamic_inbound_mapping EPC feature Koichiro Den
2026-01-24 14:50 ` [PATCH v10 2/8] PCI: endpoint: Add BAR subrange mapping support Koichiro Den
2026-01-24 14:50 ` [PATCH v10 3/8] PCI: dwc: Advertise dynamic inbound " Koichiro Den
2026-03-13 15:59   ` Christian Bruel
2026-03-13 18:18     ` Bjorn Helgaas
2026-03-16 12:26       ` Christian Bruel
2026-03-14  4:33     ` Koichiro Den
2026-03-16 12:41       ` Christian Bruel
2026-03-16 12:57         ` Niklas Cassel
2026-03-16 13:29           ` Christian Bruel [this message]
2026-03-16 13:50             ` Koichiro Den
2026-01-24 14:50 ` [PATCH v10 4/8] PCI: dwc: ep: Support BAR subrange inbound mapping via Address Match Mode iATU Koichiro Den
2026-01-26 10:25   ` Niklas Cassel
2026-01-24 14:50 ` [PATCH v10 5/8] Documentation: PCI: endpoint: Clarify pci_epc_set_bar() usage Koichiro Den
2026-01-24 14:50 ` [PATCH v10 6/8] PCI: endpoint: pci-epf-test: Add BAR subrange mapping test support Koichiro Den
2026-01-24 14:50 ` [PATCH v10 7/8] misc: pci_endpoint_test: Add BAR subrange mapping test case Koichiro Den
2026-01-24 14:50 ` [PATCH v10 8/8] selftests: pci_endpoint: " Koichiro Den
2026-01-28 13:47 ` [PATCH v10 0/8] PCI: endpoint: BAR subrange mapping support Manivannan Sadhasivam

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=ba3ae9a0-11ba-4000-b2ed-08aeede0dc54@foss.st.com \
    --to=christian.bruel@foss.st.com \
    --cc=18255117159@163.com \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=den@valinux.co.jp \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=heiko@sntech.de \
    --cc=hongxing.zhu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=jesper.nilsson@axis.com \
    --cc=jingoohan1@gmail.com \
    --cc=jirislaby@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@axis.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lpieralisi@kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mani@kernel.org \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=minghuan.Lian@nxp.com \
    --cc=mingkai.hu@nxp.com \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=robh@kernel.org \
    --cc=rongqianfeng@vivo.com \
    --cc=roy.zang@nxp.com \
    --cc=s-vadapalli@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.lin@rock-chips.com \
    --cc=shawnguo@kernel.org \
    --cc=shuah@kernel.org \
    --cc=srikanth.thokala@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=vidyas@nvidia.com \
    --cc=vigneshr@ti.com \
    --cc=yoshihiro.shimoda.uh@renesas.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