lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260114-dma_common_config-v1-2-64feb836ff04@nxp.com>
Date: Wed, 14 Jan 2026 12:12:43 -0500
From: Frank Li <Frank.Li@....com>
To: Vinod Koul <vkoul@...nel.org>, Shawn Guo <shawnguo@...nel.org>, 
 Sascha Hauer <s.hauer@...gutronix.de>, 
 Pengutronix Kernel Team <kernel@...gutronix.de>, 
 Fabio Estevam <festevam@...il.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org, 
 imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, 
 Frank Li <Frank.Li@....com>
Subject: [PATCH 2/6] dmaengine: Add common slave configuration to dma_chan

Add a common slave configuration 'config' to struct dma_chan to avoid
duplicating configuration data in each driver. Store the configuration when
dmaengine_slave_config() is called.

Signed-off-by: Frank Li <Frank.Li@....com>
---
 include/linux/dmaengine.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 01d3e44e3cb426d9ad085eda1bc562ca7d266cb0..362a43c3e36e232b5a65ff78ba0b692c0401e50c 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -432,6 +432,8 @@ struct dma_chan {
 	char *dbg_client_name;
 #endif
 
+	struct dma_slave_config config;
+
 	struct list_head device_node;
 	struct dma_chan_percpu __percpu *local;
 	int client_count;
@@ -962,6 +964,8 @@ struct dma_device {
 static inline int dmaengine_slave_config(struct dma_chan *chan,
 					  struct dma_slave_config *config)
 {
+	chan->config = *config;
+
 	if (chan->device->device_config)
 		return chan->device->device_config(chan, config);
 

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ