Skip to content

Commit 48a9db4

Browse files
bzolniertorvalds
authored andcommitted
drivers/dma: remove unused support for MEMSET operations
There have never been any real users of MEMSET operations since they have been introduced in January 2007 by commit 7405f74 ("dmaengine: refactor dmaengine around dma_async_tx_descriptor"). Therefore remove support for them for now, it can be always brought back when needed. [sebastian.hesselbarth@gmail.com: fix drivers/dma/mv_xor] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Cc: Vinod Koul <vinod.koul@intel.com> Acked-by: Dan Williams <djbw@fb.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Olof Johansson <olof@lixom.net> Cc: Kevin Hilman <khilman@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent dcf6d29 commit 48a9db4

18 files changed

Lines changed: 8 additions & 462 deletions

File tree

‎Documentation/crypto/async-tx-api.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,5 +222,4 @@ drivers/dma/: location for offload engine drivers
222222
include/linux/async_tx.h: core header file for the async_tx api
223223
crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code
224224
crypto/async_tx/async_memcpy.c: copy offload
225-
crypto/async_tx/async_memset.c: memory fill offload
226225
crypto/async_tx/async_xor.c: xor and xor zero sum offload

‎arch/arm/mach-iop13xx/setup.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ void __init iop13xx_platform_init(void)
469469
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
470470
dma_cap_set(DMA_XOR, plat_data->cap_mask);
471471
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
472-
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
473472
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
474473
break;
475474
case IOP13XX_INIT_ADMA_1:
@@ -479,7 +478,6 @@ void __init iop13xx_platform_init(void)
479478
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
480479
dma_cap_set(DMA_XOR, plat_data->cap_mask);
481480
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
482-
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
483481
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
484482
break;
485483
case IOP13XX_INIT_ADMA_2:
@@ -489,7 +487,6 @@ void __init iop13xx_platform_init(void)
489487
dma_cap_set(DMA_MEMCPY, plat_data->cap_mask);
490488
dma_cap_set(DMA_XOR, plat_data->cap_mask);
491489
dma_cap_set(DMA_XOR_VAL, plat_data->cap_mask);
492-
dma_cap_set(DMA_MEMSET, plat_data->cap_mask);
493490
dma_cap_set(DMA_INTERRUPT, plat_data->cap_mask);
494491
dma_cap_set(DMA_PQ, plat_data->cap_mask);
495492
dma_cap_set(DMA_PQ_VAL, plat_data->cap_mask);

‎arch/arm/plat-iop/adma.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,10 @@ static int __init iop3xx_adma_cap_init(void)
192192

193193
#ifdef CONFIG_ARCH_IOP32X /* the 32x AAU does not perform zero sum */
194194
dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
195-
dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
196195
dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
197196
#else
198197
dma_cap_set(DMA_XOR, iop3xx_aau_data.cap_mask);
199198
dma_cap_set(DMA_XOR_VAL, iop3xx_aau_data.cap_mask);
200-
dma_cap_set(DMA_MEMSET, iop3xx_aau_data.cap_mask);
201199
dma_cap_set(DMA_INTERRUPT, iop3xx_aau_data.cap_mask);
202200
#endif
203201

‎arch/arm/plat-orion/common.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,9 @@ void __init orion_xor0_init(unsigned long mapbase_low,
666666
orion_xor0_shared_resources[3].start = irq_1;
667667
orion_xor0_shared_resources[3].end = irq_1;
668668

669-
/*
670-
* two engines can't do memset simultaneously, this limitation
671-
* satisfied by removing memset support from one of the engines.
672-
*/
673669
dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[0].cap_mask);
674670
dma_cap_set(DMA_XOR, orion_xor0_channels_data[0].cap_mask);
675671

676-
dma_cap_set(DMA_MEMSET, orion_xor0_channels_data[1].cap_mask);
677672
dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[1].cap_mask);
678673
dma_cap_set(DMA_XOR, orion_xor0_channels_data[1].cap_mask);
679674

@@ -732,14 +727,9 @@ void __init orion_xor1_init(unsigned long mapbase_low,
732727
orion_xor1_shared_resources[3].start = irq_1;
733728
orion_xor1_shared_resources[3].end = irq_1;
734729

735-
/*
736-
* two engines can't do memset simultaneously, this limitation
737-
* satisfied by removing memset support from one of the engines.
738-
*/
739730
dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[0].cap_mask);
740731
dma_cap_set(DMA_XOR, orion_xor1_channels_data[0].cap_mask);
741732

742-
dma_cap_set(DMA_MEMSET, orion_xor1_channels_data[1].cap_mask);
743733
dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[1].cap_mask);
744734
dma_cap_set(DMA_XOR, orion_xor1_channels_data[1].cap_mask);
745735

‎crypto/async_tx/Kconfig‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ config ASYNC_XOR
1010
select ASYNC_CORE
1111
select XOR_BLOCKS
1212

13-
config ASYNC_MEMSET
14-
tristate
15-
select ASYNC_CORE
16-
1713
config ASYNC_PQ
1814
tristate
1915
select ASYNC_CORE

‎crypto/async_tx/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
obj-$(CONFIG_ASYNC_CORE) += async_tx.o
22
obj-$(CONFIG_ASYNC_MEMCPY) += async_memcpy.o
3-
obj-$(CONFIG_ASYNC_MEMSET) += async_memset.o
43
obj-$(CONFIG_ASYNC_XOR) += async_xor.o
54
obj-$(CONFIG_ASYNC_PQ) += async_pq.o
65
obj-$(CONFIG_ASYNC_RAID6_RECOV) += async_raid6_recov.o

‎crypto/async_tx/async_memset.c‎

Lines changed: 0 additions & 89 deletions
This file was deleted.

‎drivers/dma/dmaengine.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,6 @@ static bool device_has_all_tx_types(struct dma_device *device)
663663
return false;
664664
#endif
665665

666-
#if defined(CONFIG_ASYNC_MEMSET) || defined(CONFIG_ASYNC_MEMSET_MODULE)
667-
if (!dma_has_cap(DMA_MEMSET, device->cap_mask))
668-
return false;
669-
#endif
670-
671666
#if defined(CONFIG_ASYNC_XOR) || defined(CONFIG_ASYNC_XOR_MODULE)
672667
if (!dma_has_cap(DMA_XOR, device->cap_mask))
673668
return false;
@@ -729,8 +724,6 @@ int dma_async_device_register(struct dma_device *device)
729724
!device->device_prep_dma_pq);
730725
BUG_ON(dma_has_cap(DMA_PQ_VAL, device->cap_mask) &&
731726
!device->device_prep_dma_pq_val);
732-
BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) &&
733-
!device->device_prep_dma_memset);
734727
BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) &&
735728
!device->device_prep_dma_interrupt);
736729
BUG_ON(dma_has_cap(DMA_SG, device->cap_mask) &&

‎drivers/dma/ioat/dma.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,12 +1105,11 @@ static ssize_t cap_show(struct dma_chan *c, char *page)
11051105
{
11061106
struct dma_device *dma = c->device;
11071107

1108-
return sprintf(page, "copy%s%s%s%s%s%s\n",
1108+
return sprintf(page, "copy%s%s%s%s%s\n",
11091109
dma_has_cap(DMA_PQ, dma->cap_mask) ? " pq" : "",
11101110
dma_has_cap(DMA_PQ_VAL, dma->cap_mask) ? " pq_val" : "",
11111111
dma_has_cap(DMA_XOR, dma->cap_mask) ? " xor" : "",
11121112
dma_has_cap(DMA_XOR_VAL, dma->cap_mask) ? " xor_val" : "",
1113-
dma_has_cap(DMA_MEMSET, dma->cap_mask) ? " fill" : "",
11141113
dma_has_cap(DMA_INTERRUPT, dma->cap_mask) ? " intr" : "");
11151114

11161115
}

‎drivers/dma/ioat/dma_v2.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ static inline u16 ioat2_xferlen_to_descs(struct ioat2_dma_chan *ioat, size_t len
123123
struct ioat_ring_ent {
124124
union {
125125
struct ioat_dma_descriptor *hw;
126-
struct ioat_fill_descriptor *fill;
127126
struct ioat_xor_descriptor *xor;
128127
struct ioat_xor_ext_descriptor *xor_ex;
129128
struct ioat_pq_descriptor *pq;

0 commit comments

Comments
 (0)