diff options
-rw-r--r-- | crypto/async_tx/async_tx.c | 6 | ||||
-rw-r--r-- | drivers/dma/Kconfig | 11 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 18 |
3 files changed, 32 insertions, 3 deletions
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index f21147f3626a..06eb6cc09fef 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #ifdef CONFIG_DMA_ENGINE | 30 | #ifdef CONFIG_DMA_ENGINE |
31 | static int __init async_tx_init(void) | 31 | static int __init async_tx_init(void) |
32 | { | 32 | { |
33 | dmaengine_get(); | 33 | async_dmaengine_get(); |
34 | 34 | ||
35 | printk(KERN_INFO "async_tx: api initialized (async)\n"); | 35 | printk(KERN_INFO "async_tx: api initialized (async)\n"); |
36 | 36 | ||
@@ -39,7 +39,7 @@ static int __init async_tx_init(void) | |||
39 | 39 | ||
40 | static void __exit async_tx_exit(void) | 40 | static void __exit async_tx_exit(void) |
41 | { | 41 | { |
42 | dmaengine_put(); | 42 | async_dmaengine_put(); |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
@@ -56,7 +56,7 @@ __async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | |||
56 | if (depend_tx && | 56 | if (depend_tx && |
57 | dma_has_cap(tx_type, depend_tx->chan->device->cap_mask)) | 57 | dma_has_cap(tx_type, depend_tx->chan->device->cap_mask)) |
58 | return depend_tx->chan; | 58 | return depend_tx->chan; |
59 | return dma_find_channel(tx_type); | 59 | return async_dma_find_channel(tx_type); |
60 | } | 60 | } |
61 | EXPORT_SYMBOL_GPL(__async_tx_find_channel); | 61 | EXPORT_SYMBOL_GPL(__async_tx_find_channel); |
62 | #else | 62 | #else |
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 48ea59e79672..3b3c01b6f1ee 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig | |||
@@ -98,6 +98,17 @@ config NET_DMA | |||
98 | Say Y here if you enabled INTEL_IOATDMA or FSL_DMA, otherwise | 98 | Say Y here if you enabled INTEL_IOATDMA or FSL_DMA, otherwise |
99 | say N. | 99 | say N. |
100 | 100 | ||
101 | config ASYNC_TX_DMA | ||
102 | bool "Async_tx: Offload support for the async_tx api" | ||
103 | depends on DMA_ENGINE | ||
104 | help | ||
105 | This allows the async_tx api to take advantage of offload engines for | ||
106 | memcpy, memset, xor, and raid6 p+q operations. If your platform has | ||
107 | a dma engine that can perform raid operations and you have enabled | ||
108 | MD_RAID456 say Y. | ||
109 | |||
110 | If unsure, say N. | ||
111 | |||
101 | config DMATEST | 112 | config DMATEST |
102 | tristate "DMA Test client" | 113 | tristate "DMA Test client" |
103 | depends on DMA_ENGINE | 114 | depends on DMA_ENGINE |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 96e676e5bf9b..2afc2c95e42d 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -288,6 +288,24 @@ static inline void net_dmaengine_put(void) | |||
288 | } | 288 | } |
289 | #endif | 289 | #endif |
290 | 290 | ||
291 | #ifdef CONFIG_ASYNC_TX_DMA | ||
292 | #define async_dmaengine_get() dmaengine_get() | ||
293 | #define async_dmaengine_put() dmaengine_put() | ||
294 | #define async_dma_find_channel(type) dma_find_channel(type) | ||
295 | #else | ||
296 | static inline void async_dmaengine_get(void) | ||
297 | { | ||
298 | } | ||
299 | static inline void async_dmaengine_put(void) | ||
300 | { | ||
301 | } | ||
302 | static inline struct dma_chan * | ||
303 | async_dma_find_channel(enum dma_transaction_type type) | ||
304 | { | ||
305 | return NULL; | ||
306 | } | ||
307 | #endif | ||
308 | |||
291 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 309 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
292 | void *dest, void *src, size_t len); | 310 | void *dest, void *src, size_t len); |
293 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 311 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, |