From: sashiko-bot@kernel.org
To: "Sumit Kumar" <sumit.kumar@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: designware: Set DMA_BYPASS bit in outbound IATU CTRL2 register
Date: Wed, 26 Aug 2026 09:26:40 +0000 [thread overview]
Message-ID: <20260826092640.CBF281F01561@smtp.kernel.org> (raw)
In-Reply-To: <20260826-dma_bypass-v1-1-3a53dc748ce2@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconditionally setting PCIE_ATU_DMA_BYPASS on all outbound iATU windows breaks built-in eDMA for platforms relying on iATU translation.
--
commit 0264996407d5cc39725b0bb26bca8b42a6f11d18
Author: Sumit Kumar <sumit.kumar@oss.qualcomm.com>
pci: designware: Set DMA_BYPASS bit in outbound IATU CTRL2 register
This commit unconditionally sets the DMA_BYPASS bit in PCIE_ATU_REGION_CTRL2
when programming outbound iATU regions for controllers >= 4.60A. This aims
to prevent unintentional address translation when DMA destination addresses
fall within an outbound iATU aperture.
> diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> index 593388f29bdd4..9297d0e607e3a 100644
> --- a/drivers/pci/controller/dwc/pcie-designware.c
> +++ b/drivers/pci/controller/dwc/pcie-designware.c
> @@ -577,6 +577,8 @@ int dw_pcie_prog_outbound_atu(struct dw_pcie *pci,
> /* The data-less messages only for now */
> val |= PCIE_ATU_INHIBIT_PAYLOAD | atu->code;
> }
> + if (dw_pcie_ver_is_ge(pci, 460A))
> + val |= PCIE_ATU_DMA_BYPASS;
> dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL2, val);
[Severity: High]
Does unconditionally setting PCIE_ATU_DMA_BYPASS on all outbound iATU
windows break built-in eDMA for platforms that rely on iATU translation?
When a standard PCI endpoint function driver allocates an outbound memory
window using pci_epc_mem_map(), it gets a local CPU physical address which
is then programmed into the DMA engine.
Because this patch unconditionally bypasses the iATU for DMA, these
platforms will send the raw CPU physical address over the PCIe link instead
of the intended PCIe bus address. Could this regression lead to host memory
corruption, IOMMU faults, or silent data corruption on platforms where the
eDMA expects the iATU to handle the CPU-to-PCI address translation?
To support bypassing safely, would this need to be conditionally enabled via
a platform quirk, or require implementing the .pci_address callback in
dw_pcie_edma_ops to translate the CPU address in software before programming
the eDMA channel?
>
> /*
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260826-dma_bypass-v1-1-3a53dc748ce2@oss.qualcomm.com?part=1
next prev parent reply other threads:[~2026-08-26 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 9:11 [PATCH] pci: designware: Set DMA_BYPASS bit in outbound IATU CTRL2 register Sumit Kumar
2026-08-26 9:26 ` sashiko-bot [this message]
2026-09-02 14:07 ` Manivannan Sadhasivam
2026-09-02 15:14 ` Krishna Chaitanya Chundru
2026-09-02 16:17 ` Manivannan Sadhasivam
2026-09-08 6:19 ` Sumit Kumar
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=20260826092640.CBF281F01561@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sumit.kumar@oss.qualcomm.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