* + rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch added to mm-nonmm-unstable branch
@ 2026-09-18 0:02 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-09-18 0:02 UTC (permalink / raw)
To: mm-commits, vkoul, mporter, kees, error27, alex.bou9, Frank.Li,
akpm
The patch titled
Subject: rapidio: use dmaengine_get_dma_device() instead of chan->device->dev
has been added to the -mm mm-nonmm-unstable branch. Its filename is
rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Frank Li <Frank.Li@nxp.com>
Subject: rapidio: use dmaengine_get_dma_device() instead of chan->device->dev
Date: Thu, 17 Sep 2026 16:50:12 -0400
Replace direct dma_chan::device::dev access with the proper
dmaengine_get_dma_device() for consumer API.
chan->device->dev is not always the device used for DMA mapping. Some DMA
engines support per-channel IOMMU mappings, so different channels may use
different DMA devices. dmaengine_get_dma_device() returns the correct
device for each channel.
This also prepares for making the DMA engine provider data structures
private. DMA consumers should not access DMA engine internals directly.
Assisted-by: LLM
Link: https://lore.kernel.org/20260917205016.1293317-1-Frank.Li@oss.nxp.com
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Vinod Koul <vkoul@kernel.org>
---
drivers/rapidio/devices/rio_mport_cdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/rapidio/devices/rio_mport_cdev.c~rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev
+++ a/drivers/rapidio/devices/rio_mport_cdev.c
@@ -555,7 +555,7 @@ static void dma_req_free(struct kref *re
refcount);
struct mport_cdev_priv *priv = req->priv;
- dma_unmap_sg(req->dmach->device->dev,
+ dma_unmap_sg(dmaengine_get_dma_device(req->dmach),
req->sgt.sgl, req->sgt.nents, req->dir);
sg_free_table(&req->sgt);
if (req->page_list) {
@@ -916,7 +916,7 @@ rio_dma_transfer(struct file *filp, u32
xfer->offset, xfer->length);
}
- nents = dma_map_sg(chan->device->dev,
+ nents = dma_map_sg(dmaengine_get_dma_device(chan),
req->sgt.sgl, req->sgt.nents, dir);
if (nents == 0) {
rmcd_error("Failed to map SG list");
_
Patches currently in -mm which might be from Frank.Li@nxp.com are
rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-18 0:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 0:02 + rapidio-use-dmaengine_get_dma_device-instead-of-chan-device-dev.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.