Skip to contentSkip to conversation

Patch "crypto: ccp - Make some CCP DMA channels private" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message Apr 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

crypto: ccp - Make some CCP DMA channels private

to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
crypto-ccp-make-some-ccp-dma-channels-private.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From efc989fce8703914bac091dcc4b8ff7a72ccf987 Mon Sep 17 00:00:00 2001

From: Gary R Hook <[email protected]>
Date: Thu, 23 Mar 2017 12:53:30 -0500
Subject: crypto: ccp - Make some CCP DMA channels private

From: Gary R Hook <[email protected]>

commit efc989fce8703914bac091dcc4b8ff7a72ccf987 upstream.

The CCP registers its queues as channels capable of handling general DMA operations. The NTB driver will use DMA if directed, but as public channels can be reserved for use in asynchronous operations some channels should be held back as private. Since the public/private determination is handled at a device level, reserve the "other" (secondary) CCP channels as private.

Add a module parameter that allows for override, to be applied to all channels on all devices.

---
 drivers/crypto/ccp/ccp-dev-v5.c    |    1 
 drivers/crypto/ccp/ccp-dev.h       |    5 ++++
 drivers/crypto/ccp/ccp-dmaengine.c |   41 +++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+)
drivers/crypto/ccp/ccp-dev-v5.c +1 -0
@@ -1014,6 +1014,7 @@ const struct ccp_vdata ccpv5a = {
 
 const struct ccp_vdata ccpv5b = {
 	.version = CCP_VERSION(5, 0),
+	.dma_chan_attr = DMA_PRIVATE,
 	.setup = ccp5other_config,
 	.perform = &ccp5_actions,
 	.bar = 2,
drivers/crypto/ccp/ccp-dev.h +5 -0
@@ -179,6 +179,10 @@
 
 /* ------------------------ General CCP Defines ------------------------ */
 
+#define	CCP_DMA_DFLT			0x0
+#define	CCP_DMA_PRIV			0x1
+#define	CCP_DMA_PUB			0x2
+
 #define CCP_DMAPOOL_MAX_SIZE		64
 #define CCP_DMAPOOL_ALIGN		BIT(5)
 
@@ -635,6 +639,7 @@ struct ccp_actions {
 /* Structure to hold CCP version-specific values */
 struct ccp_vdata {
 	const unsigned int version;
+	const unsigned int dma_chan_attr;
 	void (*setup)(struct ccp_device *);
 	const struct ccp_actions *perform;
 	const unsigned int bar;
drivers/crypto/ccp/ccp-dmaengine.c +41 -0

59 lines not on this page · raw message

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/crypto-ccp-make-some-ccp-dma-channels-private.patch