DMA Engine development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Devendra K Verma" <devverma@amd.com>
Cc: vkoul@kernel.org, dmaengine@vger.kernel.org, Frank.Li@kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 3/3] dmaengine: dw-edma: Add changes to support Channel Separation
Date: Tue, 28 Jul 2026 09:31:21 +0000	[thread overview]
Message-ID: <20260728093121.865D81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260728091744.1086942-4-devverma@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] eDMA/HDMA register base address missing capability offset
--

--- Patch [3]: [PATCH v2 3/3] dmaengine: dw-edma: Add changes to support Channel Separation ---
commit d8b9ebd109653d1219284d3ab6408816a9dc7745
Author: Devendra K Verma <devverma@amd.com>

dmaengine: dw-edma: Add changes to support Channel Separation

This commit updates the driver to support configurable DMA channel register
space separation. It modifies channel register base address calculations to
use a dynamic separation size instead of a fixed layout, and removes unused
legacy register layout structures.

> diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
> index d0f209082878d..f2a9ae8d0f3c4 100644
> --- a/drivers/dma/dw-edma/dw-edma-pcie.c
> +++ b/drivers/dma/dw-edma/dw-edma-pcie.c

[ ... ]

> @@ -437,6 +440,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
>  	chip->nr_irqs = nr_irqs;
>  	chip->ops = &dw_edma_pcie_plat_ops;
>  	chip->cfg_non_ll = non_ll;
> +	chip->ch_sep_sz = vsec_data->ch_sep_sz;
>  
>  	chip->ll_wr_cnt = vsec_data->wr_ch_cnt;
>  	chip->ll_rd_cnt = vsec_data->rd_ch_cnt;

[Severity: High]
This is a pre-existing issue, but does dw_edma_pcie_probe() assign the wrong
MMIO base offset to chip->reg_base?

Just below this hunk in dw_edma_pcie_probe(), the code assigns:

    chip->reg_base = pcim_iomap_table(pdev)[vsec_data->rg.bar];
    if (!chip->reg_base)
        return -ENOMEM;

It appears the vsec_data->rg.off capability offset is never added to this base
address. Without adding the offset, won't all subsequent eDMA/HDMA register
accesses target the wrong MMIO locations (offset 0 of the BAR instead of the
specified offset like 4KB), potentially triggering bus faults or preventing
the DMA hardware from initializing?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728091744.1086942-1-devverma@amd.com?part=3

      reply	other threads:[~2026-07-28  9:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  9:17 [PATCH v2 0/3] CPM6 Channel Separation Support Devendra K Verma
2026-07-28  9:17 ` [PATCH v2 1/3] dmaengine: dw-edma: Make Xilinx Macros Dev Name Agnostic Devendra K Verma
2026-07-28  9:28   ` sashiko-bot
2026-07-28 15:31   ` Frank Li
2026-07-28  9:17 ` [PATCH v2 2/3] dmaengine: dw-edma: Enable Chan Separation via VSEC Devendra K Verma
2026-07-28  9:31   ` sashiko-bot
2026-07-28 15:33   ` Frank Li
2026-07-28  9:17 ` [PATCH v2 3/3] dmaengine: dw-edma: Add changes to support Channel Separation Devendra K Verma
2026-07-28  9:31   ` sashiko-bot [this message]

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=20260728093121.865D81F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=devverma@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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