From: Niklas Cassel <cassel@kernel.org>
To: Xincheng Zhang <zhangxincheng@ultrarisc.com>
Cc: jingoohan1@gmail.com, mani@kernel.org, lpieralisi@kernel.org,
kwilczynski@kernel.org, robh@kernel.org, bhelgaas@google.com,
wangjia@ultrarisc.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, Frank Li <Frank.Li@kernel.org>
Subject: Re: [PATCH 1/2] PCI: dwc: Allow drivers to skip MEM outbound iATU setup
Date: Fri, 4 Sep 2026 07:37:23 +0200 [thread overview]
Message-ID: <appZE_65HKRSoZA4@fedora> (raw)
In-Reply-To: <20260904015134.3740048-1-zhangxincheng@ultrarisc.com>
On Fri, Sep 04, 2026 at 09:51:34AM +0800, Xincheng Zhang wrote:
> On Thu, Sep 03, 2026 at 05:30:18PM +0200, Niklas Cassel wrote:
>
> Yes, I agree that the skipped MEM windows need an identity mapping check.
> In v2 I will move the bypass decision until after calculating the same
> outbound addresses used by the normal iATU programming path, and fail the
> host init if a skipped MEM range is not identity-mapped:
>
> atu.parent_bus_addr = entry->res->start - pci->parent_bus_offset;
> atu.pci_addr = entry->res->start - entry->offset;
>
> if (pp->bypass_ob_mem_iatu &&
> atu.parent_bus_addr != atu.pci_addr)
> return -EINVAL;
Looks good.
I think it also makes sense to add a short code comment above the
if-statement.
>
> This should prevent the driver from silently relying on no-match pass-through
> when the DT "ranges" describe different parent-bus and PCI addresses.
>
> For the databook reference, the relevant text I found is in the DWC PCIe RP
> Controller Databook v6.00a, June 2022. Section 3.12.2 says the default
> outbound no-match behavior is pass-through, and Section 3.12.5.6 "No Address
> Match Result" says the address is not translated and programmable TLP header
> information comes from the application transmit interface. I will cite those
> RP Databook sections in the v2 commit message instead of referring to this
> generically.
Sounds good.
Kind regards,
Niklas
next prev parent reply other threads:[~2026-09-04 5:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 5:54 [PATCH 0/2] PCI: dwc: Support large BARs on UltraRISC DP1000 Xincheng Zhang
2026-08-27 5:54 ` [PATCH 1/2] PCI: dwc: Allow drivers to skip MEM outbound iATU setup Xincheng Zhang
2026-08-27 5:59 ` sashiko-bot
2026-09-02 14:18 ` Manivannan Sadhasivam
2026-09-03 3:00 ` Xincheng Zhang
2026-09-03 15:17 ` Niklas Cassel
2026-09-03 15:30 ` Niklas Cassel
2026-09-04 1:51 ` Xincheng Zhang
2026-09-04 5:37 ` Niklas Cassel [this message]
2026-08-27 5:54 ` [PATCH 2/2] PCI: ultrarisc: Skip MEM outbound iATU setup on DP1000 Xincheng Zhang
2026-08-27 6:08 ` sashiko-bot
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=appZE_65HKRSoZA4@fedora \
--to=cassel@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=bhelgaas@google.com \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=wangjia@ultrarisc.com \
--cc=zhangxincheng@ultrarisc.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