Skip to content

Commit d0cd848

Browse files
committed
Merge tag 'dmaengine-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine
Pull dmaengine updates from Dan Williams: "Even though this has fixes marked for -stable, given the size and the needed conflict resolutions this is 3.18-rc1/merge-window material. These patches have been languishing in my tree for a long while. The fact that I do not have the time to do proper/prompt maintenance of this tree is a primary factor in the decision to step down as dmaengine maintainer. That and the fact that the bulk of drivers/dma/ activity is going through Vinod these days. The net_dma removal has not been in -next. It has developed simple conflicts against mainline and net-next (for-3.18). Continuing thanks to Vinod for staying on top of drivers/dma/. Summary: 1/ Step down as dmaengine maintainer see commit 08223d8 "dmaengine maintainer update" 2/ Removal of net_dma, as it has been marked 'broken' since 3.13 (commit 7787380 "net_dma: mark broken"), without reports of performance regression. 3/ Miscellaneous fixes" * tag 'dmaengine-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine: net: make tcp_cleanup_rbuf private net_dma: revert 'copied_early' net_dma: simple removal dmaengine maintainer update dmatest: prevent memory leakage on error path in thread ioat: Use time_before_jiffies() dmaengine: fix xor sources continuation dma: mv_xor: Rename __mv_xor_slot_cleanup() to mv_xor_slot_cleanup() dma: mv_xor: Remove all callers of mv_xor_slot_cleanup() dma: mv_xor: Remove unneeded mv_xor_clean_completed_slots() call ioat: Use pci_enable_msix_exact() instead of pci_enable_msix() drivers: dma: Include appropriate header file in dca.c drivers: dma: Mark functions as static in dma_v3.c dma: mv_xor: Add DMA API error checks ioat/dca: Use dev_is_pci() to check whether it is pci device
2 parents bdf428f + 3f33407 commit d0cd848

33 files changed

Lines changed: 129 additions & 955 deletions

File tree

‎Documentation/ABI/removed/net_dma‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
What: tcp_dma_copybreak sysctl
2+
Date: Removed in kernel v3.13
3+
Contact: Dan Williams <dan.j.williams@intel.com>
4+
Description:
5+
Formerly the lower limit, in bytes, of the size of socket reads
6+
that will be offloaded to a DMA copy engine. Removed due to
7+
coherency issues of the cpu potentially touching the buffers
8+
while dma is in flight.

‎Documentation/networking/ip-sysctl.txt‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,6 @@ tcp_workaround_signed_windows - BOOLEAN
580580
not receive a window scaling option from them.
581581
Default: 0
582582

583-
tcp_dma_copybreak - INTEGER
584-
Lower limit, in bytes, of the size of socket reads that will be
585-
offloaded to a DMA copy engine, if one is present in the system
586-
and CONFIG_NET_DMA is enabled.
587-
Default: 4096
588-
589583
tcp_thin_linear_timeouts - BOOLEAN
590584
Enable dynamic triggering of linear timeouts for thin streams.
591585
If set, a check is performed upon retransmission by timeout to

‎MAINTAINERS‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,24 +1025,20 @@ F: arch/arm/mach-pxa/colibri-pxa270-income.c
10251025

10261026
ARM/INTEL IOP32X ARM ARCHITECTURE
10271027
M: Lennert Buytenhek <kernel@wantstofly.org>
1028-
M: Dan Williams <dan.j.williams@intel.com>
10291028
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
10301029
S: Maintained
10311030

10321031
ARM/INTEL IOP33X ARM ARCHITECTURE
1033-
M: Dan Williams <dan.j.williams@intel.com>
10341032
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1035-
S: Maintained
1033+
S: Orphan
10361034

10371035
ARM/INTEL IOP13XX ARM ARCHITECTURE
10381036
M: Lennert Buytenhek <kernel@wantstofly.org>
1039-
M: Dan Williams <dan.j.williams@intel.com>
10401037
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
10411038
S: Maintained
10421039

10431040
ARM/INTEL IQ81342EX MACHINE SUPPORT
10441041
M: Lennert Buytenhek <kernel@wantstofly.org>
1045-
M: Dan Williams <dan.j.williams@intel.com>
10461042
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
10471043
S: Maintained
10481044

@@ -1067,7 +1063,6 @@ F: drivers/pcmcia/pxa2xx_stargate2.c
10671063

10681064
ARM/INTEL XSC3 (MANZANO) ARM CORE
10691065
M: Lennert Buytenhek <kernel@wantstofly.org>
1070-
M: Dan Williams <dan.j.williams@intel.com>
10711066
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
10721067
S: Maintained
10731068

@@ -1562,9 +1557,9 @@ F: drivers/platform/x86/asus*.c
15621557
F: drivers/platform/x86/eeepc*.c
15631558

15641559
ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API
1565-
M: Dan Williams <dan.j.williams@intel.com>
1560+
R: Dan Williams <dan.j.williams@intel.com>
15661561
W: http://sourceforge.net/projects/xscaleiop
1567-
S: Maintained
1562+
S: Odd fixes
15681563
F: Documentation/crypto/async-tx-api.txt
15691564
F: crypto/async_tx/
15701565
F: drivers/dma/
@@ -2995,13 +2990,11 @@ T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
29952990

29962991
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
29972992
M: Vinod Koul <vinod.koul@intel.com>
2998-
M: Dan Williams <dan.j.williams@intel.com>
29992993
L: dmaengine@vger.kernel.org
30002994
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
3001-
S: Supported
2995+
S: Maintained
30022996
F: drivers/dma/
30032997
F: include/linux/dma*
3004-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx.git
30052998
T: git git://git.infradead.org/users/vkoul/slave-dma.git (slave-dma)
30062999

30073000
DME1737 HARDWARE MONITOR DRIVER
@@ -4754,8 +4747,8 @@ F: arch/x86/kernel/cpu/microcode/core*
47544747
F: arch/x86/kernel/cpu/microcode/intel*
47554748

47564749
INTEL I/OAT DMA DRIVER
4757-
M: Dan Williams <dan.j.williams@intel.com>
47584750
M: Dave Jiang <dave.jiang@intel.com>
4751+
R: Dan Williams <dan.j.williams@intel.com>
47594752
L: dmaengine@vger.kernel.org
47604753
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
47614754
S: Supported
@@ -4770,7 +4763,7 @@ F: drivers/iommu/intel-iommu.c
47704763
F: include/linux/intel-iommu.h
47714764

47724765
INTEL IOP-ADMA DMA DRIVER
4773-
M: Dan Williams <dan.j.williams@intel.com>
4766+
R: Dan Williams <dan.j.williams@intel.com>
47744767
S: Odd fixes
47754768
F: drivers/dma/iop-adma.c
47764769

‎crypto/async_tx/async_xor.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ do_async_xor(struct dma_chan *chan, struct dmaengine_unmap_data *unmap,
7878
tx = dma->device_prep_dma_xor(chan, dma_dest, src_list,
7979
xor_src_cnt, unmap->len,
8080
dma_flags);
81-
src_list[0] = tmp;
82-
8381

8482
if (unlikely(!tx))
8583
async_tx_quiesce(&submit->depend_tx);
@@ -92,6 +90,7 @@ do_async_xor(struct dma_chan *chan, struct dmaengine_unmap_data *unmap,
9290
xor_src_cnt, unmap->len,
9391
dma_flags);
9492
}
93+
src_list[0] = tmp;
9594

9695
dma_set_unmap(tx, unmap);
9796
async_tx_submit(chan, tx, submit);

‎drivers/dma/Kconfig‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -427,18 +427,6 @@ config DMA_OF
427427
comment "DMA Clients"
428428
depends on DMA_ENGINE
429429

430-
config NET_DMA
431-
bool "Network: TCP receive copy offload"
432-
depends on DMA_ENGINE && NET
433-
default (INTEL_IOATDMA || FSL_DMA)
434-
depends on BROKEN
435-
help
436-
This enables the use of DMA engines in the network stack to
437-
offload receive copy-to-user operations, freeing CPU cycles.
438-
439-
Say Y here if you enabled INTEL_IOATDMA or FSL_DMA, otherwise
440-
say N.
441-
442430
config ASYNC_TX_DMA
443431
bool "Async_tx: Offload support for the async_tx api"
444432
depends on DMA_ENGINE

‎drivers/dma/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ obj-$(CONFIG_DMA_VIRTUAL_CHANNELS) += virt-dma.o
66
obj-$(CONFIG_DMA_ACPI) += acpi-dma.o
77
obj-$(CONFIG_DMA_OF) += of-dma.o
88

9-
obj-$(CONFIG_NET_DMA) += iovlock.o
109
obj-$(CONFIG_INTEL_MID_DMAC) += intel_mid_dma.o
1110
obj-$(CONFIG_DMATEST) += dmatest.o
1211
obj-$(CONFIG_INTEL_IOATDMA) += ioat/

‎drivers/dma/dmaengine.c‎

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,110 +1081,6 @@ dmaengine_get_unmap_data(struct device *dev, int nr, gfp_t flags)
10811081
}
10821082
EXPORT_SYMBOL(dmaengine_get_unmap_data);
10831083

1084-
/**
1085-
* dma_async_memcpy_pg_to_pg - offloaded copy from page to page
1086-
* @chan: DMA channel to offload copy to
1087-
* @dest_pg: destination page
1088-
* @dest_off: offset in page to copy to
1089-
* @src_pg: source page
1090-
* @src_off: offset in page to copy from
1091-
* @len: length
1092-
*
1093-
* Both @dest_page/@dest_off and @src_page/@src_off must be mappable to a bus
1094-
* address according to the DMA mapping API rules for streaming mappings.
1095-
* Both @dest_page/@dest_off and @src_page/@src_off must stay memory resident
1096-
* (kernel memory or locked user space pages).
1097-
*/
1098-
dma_cookie_t
1099-
dma_async_memcpy_pg_to_pg(struct dma_chan *chan, struct page *dest_pg,
1100-
unsigned int dest_off, struct page *src_pg, unsigned int src_off,
1101-
size_t len)
1102-
{
1103-
struct dma_device *dev = chan->device;
1104-
struct dma_async_tx_descriptor *tx;
1105-
struct dmaengine_unmap_data *unmap;
1106-
dma_cookie_t cookie;
1107-
unsigned long flags;
1108-
1109-
unmap = dmaengine_get_unmap_data(dev->dev, 2, GFP_NOWAIT);
1110-
if (!unmap)
1111-
return -ENOMEM;
1112-
1113-
unmap->to_cnt = 1;
1114-
unmap->from_cnt = 1;
1115-
unmap->addr[0] = dma_map_page(dev->dev, src_pg, src_off, len,
1116-
DMA_TO_DEVICE);
1117-
unmap->addr[1] = dma_map_page(dev->dev, dest_pg, dest_off, len,
1118-
DMA_FROM_DEVICE);
1119-
unmap->len = len;
1120-
flags = DMA_CTRL_ACK;
1121-
tx = dev->device_prep_dma_memcpy(chan, unmap->addr[1], unmap->addr[0],
1122-
len, flags);
1123-
1124-
if (!tx) {
1125-
dmaengine_unmap_put(unmap);
1126-
return -ENOMEM;
1127-
}
1128-
1129-
dma_set_unmap(tx, unmap);
1130-
cookie = tx->tx_submit(tx);
1131-
dmaengine_unmap_put(unmap);
1132-
1133-
preempt_disable();
1134-
__this_cpu_add(chan->local->bytes_transferred, len);
1135-
__this_cpu_inc(chan->local->memcpy_count);
1136-
preempt_enable();
1137-
1138-
return cookie;
1139-
}
1140-
EXPORT_SYMBOL(dma_async_memcpy_pg_to_pg);
1141-
1142-
/**
1143-
* dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses
1144-
* @chan: DMA channel to offload copy to
1145-
* @dest: destination address (virtual)
1146-
* @src: source address (virtual)
1147-
* @len: length
1148-
*
1149-
* Both @dest and @src must be mappable to a bus address according to the
1150-
* DMA mapping API rules for streaming mappings.
1151-
* Both @dest and @src must stay memory resident (kernel memory or locked
1152-
* user space pages).
1153-
*/
1154-
dma_cookie_t
1155-
dma_async_memcpy_buf_to_buf(struct dma_chan *chan, void *dest,
1156-
void *src, size_t len)
1157-
{
1158-
return dma_async_memcpy_pg_to_pg(chan, virt_to_page(dest),
1159-
(unsigned long) dest & ~PAGE_MASK,
1160-
virt_to_page(src),
1161-
(unsigned long) src & ~PAGE_MASK, len);
1162-
}
1163-
EXPORT_SYMBOL(dma_async_memcpy_buf_to_buf);
1164-
1165-
/**
1166-
* dma_async_memcpy_buf_to_pg - offloaded copy from address to page
1167-
* @chan: DMA channel to offload copy to
1168-
* @page: destination page
1169-
* @offset: offset in page to copy to
1170-
* @kdata: source address (virtual)
1171-
* @len: length
1172-
*
1173-
* Both @page/@offset and @kdata must be mappable to a bus address according
1174-
* to the DMA mapping API rules for streaming mappings.
1175-
* Both @page/@offset and @kdata must stay memory resident (kernel memory or
1176-
* locked user space pages)
1177-
*/
1178-
dma_cookie_t
1179-
dma_async_memcpy_buf_to_pg(struct dma_chan *chan, struct page *page,
1180-
unsigned int offset, void *kdata, size_t len)
1181-
{
1182-
return dma_async_memcpy_pg_to_pg(chan, page, offset,
1183-
virt_to_page(kdata),
1184-
(unsigned long) kdata & ~PAGE_MASK, len);
1185-
}
1186-
EXPORT_SYMBOL(dma_async_memcpy_buf_to_pg);
1187-
11881084
void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx,
11891085
struct dma_chan *chan)
11901086
{

‎drivers/dma/dmatest.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,14 +688,14 @@ static int dmatest_func(void *data)
688688
runtime = ktime_us_delta(ktime_get(), ktime);
689689

690690
ret = 0;
691+
err_dstbuf:
691692
for (i = 0; thread->dsts[i]; i++)
692693
kfree(thread->dsts[i]);
693-
err_dstbuf:
694694
kfree(thread->dsts);
695695
err_dsts:
696+
err_srcbuf:
696697
for (i = 0; thread->srcs[i]; i++)
697698
kfree(thread->srcs[i]);
698-
err_srcbuf:
699699
kfree(thread->srcs);
700700
err_srcs:
701701
kfree(pq_coefs);

‎drivers/dma/ioat/dca.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
#include "dma.h"
3737
#include "registers.h"
38+
#include "dma_v2.h"
3839

3940
/*
4041
* Bit 7 of a tag map entry is the "valid" bit, if it is set then bits 0:6
@@ -147,7 +148,7 @@ static int ioat_dca_add_requester(struct dca_provider *dca, struct device *dev)
147148
u16 id;
148149

149150
/* This implementation only supports PCI-Express */
150-
if (dev->bus != &pci_bus_type)
151+
if (!dev_is_pci(dev))
151152
return -ENODEV;
152153
pdev = to_pci_dev(dev);
153154
id = dcaid_from_pcidev(pdev);
@@ -179,7 +180,7 @@ static int ioat_dca_remove_requester(struct dca_provider *dca,
179180
int i;
180181

181182
/* This implementation only supports PCI-Express */
182-
if (dev->bus != &pci_bus_type)
183+
if (!dev_is_pci(dev))
183184
return -ENODEV;
184185
pdev = to_pci_dev(dev);
185186

@@ -320,7 +321,7 @@ static int ioat2_dca_add_requester(struct dca_provider *dca, struct device *dev)
320321
u16 global_req_table;
321322

322323
/* This implementation only supports PCI-Express */
323-
if (dev->bus != &pci_bus_type)
324+
if (!dev_is_pci(dev))
324325
return -ENODEV;
325326
pdev = to_pci_dev(dev);
326327
id = dcaid_from_pcidev(pdev);
@@ -354,7 +355,7 @@ static int ioat2_dca_remove_requester(struct dca_provider *dca,
354355
u16 global_req_table;
355356

356357
/* This implementation only supports PCI-Express */
357-
if (dev->bus != &pci_bus_type)
358+
if (!dev_is_pci(dev))
358359
return -ENODEV;
359360
pdev = to_pci_dev(dev);
360361

@@ -496,7 +497,7 @@ static int ioat3_dca_add_requester(struct dca_provider *dca, struct device *dev)
496497
u16 global_req_table;
497498

498499
/* This implementation only supports PCI-Express */
499-
if (dev->bus != &pci_bus_type)
500+
if (!dev_is_pci(dev))
500501
return -ENODEV;
501502
pdev = to_pci_dev(dev);
502503
id = dcaid_from_pcidev(pdev);
@@ -530,7 +531,7 @@ static int ioat3_dca_remove_requester(struct dca_provider *dca,
530531
u16 global_req_table;
531532

532533
/* This implementation only supports PCI-Express */
533-
if (dev->bus != &pci_bus_type)
534+
if (!dev_is_pci(dev))
534535
return -ENODEV;
535536
pdev = to_pci_dev(dev);
536537

‎drivers/dma/ioat/dma.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ int ioat_dma_setup_interrupts(struct ioatdma_device *device)
947947
for (i = 0; i < msixcnt; i++)
948948
device->msix_entries[i].entry = i;
949949

950-
err = pci_enable_msix(pdev, device->msix_entries, msixcnt);
950+
err = pci_enable_msix_exact(pdev, device->msix_entries, msixcnt);
951951
if (err)
952952
goto msi;
953953

@@ -1222,7 +1222,6 @@ int ioat1_dma_probe(struct ioatdma_device *device, int dca)
12221222
err = ioat_probe(device);
12231223
if (err)
12241224
return err;
1225-
ioat_set_tcp_copy_break(4096);
12261225
err = ioat_register(device);
12271226
if (err)
12281227
return err;

0 commit comments

Comments
 (0)