From: Frank Li <Frank.li@oss.nxp.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Peng Fan <peng.fan@linux.dev>,
"Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
Frank Li <Frank.Li@nxp.com>, Vinod Koul <vkoul@kernel.org>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Jon Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Frank Li <Frank.Li@kernel.org>,
Larisa IIeana Grigore <larisa.grigore@nxp.com>,
imx@lists.linux.dev, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
linux-tegra@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v6 0/9] dmaengine: add DMA channel bus and fsl-edma per-channel IOMMU support
Date: Tue, 17 Nov 2026 10:51:47 -0600 [thread overview]
Message-ID: <avyGI6QmuZ3DUqc9@SMW015318> (raw)
In-Reply-To: <20261117130005.GC2606445@ziepe.ca>
On Tue, Nov 17, 2026 at 09:00:05AM -0400, Jason Gunthorpe wrote:
> [You don't often get email from jgg@ziepe.ca. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On Tue, Nov 17, 2026 at 04:30:15PM +0800, Peng Fan wrote:
> > On Mon, Nov 16, 2026 at 03:30:21PM -0400, Jason Gunthorpe wrote:
> > >On Thu, Nov 12, 2026 at 03:53:03PM +0800, Peng Fan (OSS) wrote:
> > >> I used iommu-map for eDMA, but iommu experts rejected it:
> > >> "Using iommu-map to describe synthetic dma_chan_dev devices that the
> > >> kernel creates is the same kind of DT abuse from over here:"
> > >> More info: https://lore.kernel.org/all/20260917144804.GI3196566@ziepe.ca/
> > >>
> > >> So I followed here [2] as Krzysztof wrote for QCOM VPU:
> > >> "Thanks Jason for context and detailed arguments. Robin did not chime in
> > >> yet, but from what I understood the DT-child-node approach will be the
> > >> way we should go here.
> > >>
> > >> I accept above point of view and I am fine with this, thus Vishnu and
> > >> Vikash - please go ahead with DT-child-node solution we had some time ago."
> > >> [2] https://lore.kernel.org/linux-iommu/c7b956a9-d3e8-4e18-b780-5d08f5cd2ca1@kernel.org/
> > >>
> > >> This series adds per-channel DT child node support to fsl-edma and, as a
> > >> prerequisite, introduces a proper bus for DMA channel devices.
> > >
> > >To be fair this is discouraged too, now that I've seen 3-4 people
> > >trying to do exactly the same thing I'm not as positive about the
> > >DT-child-node hack.
> >
> > I may not describe it clear in cover-letter.
> >
> > I understand the concern. Let me explain why I believe it is justified here
> > rather than a hack.
> >
> > On i.MX eDMA each channel has its own interrupt, its own register region,
> > and on i.MX8QM even its own power domain. Each channel may also have its
> > own Stream ID, or share one when SIDs are scarce. These are genuine
> > per-channel hardware resources, not software fiction.
> >
> > In dmaengine each channel is already modeled as a channel device (see
> > dmaengine_chan_dev()), and this series puts those devices on a real bus
> > (dmaengine_chan_bus_type) as a prerequisite. The DT child node simply
> > describes that existing device, so its reg/interrupts/power-domains/iommus
> > are attached per channel instead of as index-matched flat lists on the
> > controller.
>
> If they are real devices then why can't they come out as platform
> devices?
It cause complex when consumer to bindle channel dynmatically.
for example:
consumer_A
{
dmas = <&dma_provider ID>;
}
if each channel is platform devices,
consumer_A
{
dmas = <&dma_provider_chan0 ID>;
}
Consumer_A will have to bindle to chan0. Actually, dma engine support bind
to any free channel. It will be problem when there are not enough channels
for all peripheral.
>
> I think you are overstating how independent they are. Many single
> devices have per "channel" resources like MMIO and IRQs. That's
> totally normal. It doesn't make the sub resources independent devices.
>
> AFAICT what you have here is some HW designer used SID where they
> should have used SSID and you are trying to hack DT to make that
> usable because Linux does not support a SID as SSID model today.
>
> Again, since this is the 3rd - 4th case like this, it seems like a
> popular hardware choice and we should try to do better to make Linux
> support if we can.
What's your prefer?
Frank
>
> Jason
next prev parent reply other threads:[~2026-11-17 16:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 7:53 [PATCH v6 0/9] dmaengine: add DMA channel bus and fsl-edma per-channel IOMMU support Peng Fan (OSS)
2026-11-12 7:53 ` [PATCH v6 1/9] dmaengine: fsl-edma: unregister channels before vchan cleanup Peng Fan (OSS)
2026-11-12 7:53 ` [PATCH v6 2/9] dmaengine: add a bus for DMA channel devices Peng Fan (OSS)
2026-11-12 15:47 ` Frank Li
2026-11-12 7:53 ` [PATCH v6 3/9] iommu: register the DMA channel bus for IOMMU notifications Peng Fan (OSS)
2026-11-12 7:53 ` [PATCH v6 4/9] dmaengine: move channel devices to the DMA channel bus Peng Fan (OSS)
2026-11-12 16:04 ` Frank Li
2026-11-12 7:53 ` [PATCH v6 5/9] dt-bindings: dma: fsl,edma: add per-channel child node support Peng Fan (OSS)
2026-11-12 7:53 ` [PATCH v6 6/9] dmaengine: fsl-edma: use BIT_ULL for 64-bit channel mask Peng Fan (OSS)
2026-11-12 16:05 ` Frank Li
2026-11-12 7:53 ` [PATCH v6 7/9] dmaengine: fsl-edma: use dmaengine_get_dma_device() Peng Fan (OSS)
2026-11-12 16:06 ` Frank Li
2026-11-12 7:53 ` [PATCH v6 8/9] dmaengine: fsl-edma: support per-channel DT child nodes Peng Fan (OSS)
2026-11-12 16:46 ` Frank Li
2026-11-12 7:53 ` [PATCH v6 9/9] arm64: dts: imx95: convert eDMA to per-channel " Peng Fan (OSS)
2026-11-16 19:30 ` [PATCH v6 0/9] dmaengine: add DMA channel bus and fsl-edma per-channel IOMMU support Jason Gunthorpe
2026-11-17 8:30 ` Peng Fan
2026-11-17 13:00 ` Jason Gunthorpe
2026-11-17 15:04 ` Peng Fan
2026-11-17 16:51 ` Frank Li [this message]
2026-11-17 16:40 ` Frank Li
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=avyGI6QmuZ3DUqc9@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=larisa.grigore@nxp.com \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=peng.fan@linux.dev \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=s.hauer@pengutronix.de \
--cc=thierry.reding@kernel.org \
--cc=vkoul@kernel.org \
--cc=will@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