From: Koichiro Den <den@valinux.co.jp>
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 01/12] dmaengine: Make dma_get_slave_channel() public
Date: Thu, 21 May 2026 15:31:04 +0900 [thread overview]
Message-ID: <20260521063115.2842238-2-den@valinux.co.jp> (raw)
In-Reply-To: <20260521063115.2842238-1-den@valinux.co.jp>
Commit c3c431de99c06 ("dmaengine: Move dma_get_{,any_}slave_channel() to
private dmaengine.h") moved dma_get_slave_channel() to the private DMA
engine header because only DMA engine drivers used it at the time.
PCI endpoint DMA needs to reserve an exact channel from outside
drivers/dma. Restore dma_get_slave_channel() to the public header for
that use case while keeping dma_get_any_slave_channel() private.
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
drivers/dma/dmaengine.h | 1 -
include/linux/dmaengine.h | 6 ++++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h
index 53f16d3f0029..bde5217ce2b5 100644
--- a/drivers/dma/dmaengine.h
+++ b/drivers/dma/dmaengine.h
@@ -179,7 +179,6 @@ dmaengine_desc_callback_valid(struct dmaengine_desc_callback *cb)
return cb->callback || cb->callback_result;
}
-struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
#ifdef CONFIG_DEBUG_FS
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index b3d251c9734e..59be52e74d5e 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1527,6 +1527,7 @@ struct dma_chan *dma_request_chan(struct device *dev, const char *name);
struct dma_chan *dma_request_chan_by_mask(const dma_cap_mask_t *mask);
struct dma_chan *devm_dma_request_chan(struct device *dev, const char *name);
+struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
void dma_release_channel(struct dma_chan *chan);
int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
#else
@@ -1568,6 +1569,11 @@ static inline struct dma_chan *devm_dma_request_chan(struct device *dev, const c
return ERR_PTR(-ENODEV);
}
+static inline struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
+{
+ return NULL;
+}
+
static inline void dma_release_channel(struct dma_chan *chan)
{
}
--
2.51.0
next prev parent reply other threads:[~2026-05-21 6:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 6:31 [PATCH 00/12] dmaengine: dw-edma: Prepare for PCI EP DMA (part 1/3) Koichiro Den
2026-05-21 6:31 ` Koichiro Den [this message]
2026-05-21 6:31 ` [PATCH 02/12] dmaengine: dw-edma: Add channel lookup helper Koichiro Den
2026-05-21 15:50 ` Frank Li
2026-05-21 6:31 ` [PATCH 03/12] dmaengine: dw-edma: Add per-channel interrupt routing control Koichiro Den
2026-05-21 6:31 ` [PATCH 04/12] dmaengine: dw-edma: Add partial channel ownership mode Koichiro Den
2026-05-21 6:31 ` [PATCH 05/12] dmaengine: dw-edma-pcie: Add capability match data Koichiro Den
2026-05-21 16:06 ` Frank Li
2026-05-22 14:38 ` Koichiro Den
2026-05-22 20:54 ` Frank Li
2026-05-21 6:31 ` [PATCH 06/12] dmaengine: dw-edma-pcie: Rename DMA data copy Koichiro Den
2026-05-21 16:10 ` Frank Li
2026-05-22 14:41 ` Koichiro Den
2026-05-21 6:31 ` [PATCH 07/12] dmaengine: dw-edma-pcie: Add default IRQ match data Koichiro Den
2026-05-21 16:12 ` Frank Li
2026-05-21 6:31 ` [PATCH 08/12] dmaengine: dw-edma-pcie: Add raw slave address match flag Koichiro Den
2026-05-21 16:15 ` Frank Li
2026-05-22 14:45 ` Koichiro Den
2026-05-21 6:31 ` [PATCH 09/12] dmaengine: dw-edma-pcie: Add register offset " Koichiro Den
2026-05-21 16:17 ` Frank Li
2026-05-22 14:57 ` Koichiro Den
2026-05-22 20:51 ` Frank Li
2026-05-21 6:31 ` [PATCH 10/12] dmaengine: dw-edma-pcie: Factor descriptor block addresses Koichiro Den
2026-05-21 16:21 ` Frank Li
2026-05-21 6:31 ` [PATCH 11/12] dmaengine: dw-edma-pcie: Handle optional data blocks Koichiro Den
2026-05-21 16:25 ` Frank Li
2026-05-21 6:31 ` [PATCH 12/12] dmaengine: dw-edma-pcie: Add chip flags match data Koichiro Den
2026-05-21 16:26 ` 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=20260521063115.2842238-2-den@valinux.co.jp \
--to=den@valinux.co.jp \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=vkoul@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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
all inboxes | Powered by JetHome®