Skip to content

Commit 3cc377b

Browse files
committed
dmaengine: fix enable for high order unmap pools
The higher order mempools support raid operations, and we want to disable them when raid support is not enabled. Making them conditional on ASYNC_TX_DMA is not sufficient as other users (specifically dmatest) will also issue raid operations. Make raid drivers explicitly request that the core carry the higher order pools. Reported-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 8e5ee25 commit 3cc377b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎drivers/dma/Kconfig‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ config INTEL_IOATDMA
6262
tristate "Intel I/OAT DMA support"
6363
depends on PCI && X86
6464
select DMA_ENGINE
65+
select DMA_ENGINE_RAID
6566
select DCA
6667
help
6768
Enable support for the Intel(R) I/OAT DMA engine present
@@ -112,6 +113,7 @@ config MV_XOR
112113
bool "Marvell XOR engine support"
113114
depends on PLAT_ORION
114115
select DMA_ENGINE
116+
select DMA_ENGINE_RAID
115117
select ASYNC_TX_ENABLE_CHANNEL_SWITCH
116118
---help---
117119
Enable support for the Marvell XOR engine.
@@ -187,6 +189,7 @@ config AMCC_PPC440SPE_ADMA
187189
tristate "AMCC PPC440SPe ADMA support"
188190
depends on 440SPe || 440SP
189191
select DMA_ENGINE
192+
select DMA_ENGINE_RAID
190193
select ARCH_HAS_ASYNC_TX_FIND_CHANNEL
191194
select ASYNC_TX_ENABLE_CHANNEL_SWITCH
192195
help
@@ -377,4 +380,7 @@ config DMATEST
377380
Simple DMA test client. Say N unless you're debugging a
378381
DMA Device driver.
379382

383+
config DMA_ENGINE_RAID
384+
bool
385+
380386
endif

‎drivers/dma/dmaengine.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ struct dmaengine_unmap_pool {
912912
#define __UNMAP_POOL(x) { .size = x, .name = "dmaengine-unmap-" __stringify(x) }
913913
static struct dmaengine_unmap_pool unmap_pool[] = {
914914
__UNMAP_POOL(2),
915-
#if IS_ENABLED(CONFIG_ASYNC_TX_DMA)
915+
#if IS_ENABLED(CONFIG_DMA_ENGINE_RAID)
916916
__UNMAP_POOL(16),
917917
__UNMAP_POOL(128),
918918
__UNMAP_POOL(256),

0 commit comments

Comments
 (0)