crypto: ccp - Make some CCP DMA channels private
Subsystems (2)
PATCH 1/1 crypto: ccp - Make some CCP DMA channels private
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
@@ -1015,6 +1015,7 @@ static void ccp5other_config(struct ccp_device *ccp)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)
@@ -636,6 +640,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
Herbert Xu
maintainerQuoted 8 lines · Gary R Hook
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.
Quoted 5 lines
Add a module parameter that allows for override, to be applied to all channels on all devices.
CC <[email protected]> # 4.10.x-Signed-off-by Gary R Hook <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt