History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma updates from Jason Gunthorpe: "A smaller set of patches, nothing stands out as being particularly major this cycle. The biggest item would be the new HIP09 HW support from HNS, otherwise it was pretty quiet for new work here: - Driver bug fixes and updates: bnxt_re, cxgb4, rxe, hns, i40iw, cxgb4, mlx4 and mlx5 - Bug fixes and polishing for the new rts ULP - Cleanup of uverbs checking for allowed driver operations - Use sysfs_emit all over the place - Lots of bug fixes and clarity improvements for hns - hip09 support for hns - NDR and 50/100Gb signaling rates - Remove dma_virt_ops and go back to using the IB DMA wrappers - mlx5 optimizations for contiguous DMA regions" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (147 commits) RDMA/cma: Don't overwrite sgid_attr after device is released RDMA/mlx5: Fix MR cache memory leak RDMA/rxe: Use acquire/release for memory ordering RDMA/hns: Simplify AEQE process for different types of queue RDMA/hns: Fix inaccurate prints RDMA/hns: Fix incorrect symbol types RDMA/hns: Clear redundant variable initialization RDMA/hns: Fix coding style issues RDMA/hns: Remove unnecessary access right set during INIT2INIT RDMA/hns: WARN_ON if get a reserved sl from users RDMA/hns: Avoid filling sl in high 3 bits of vlan_id RDMA/hns: Do shift on traffic class when using RoCEv2 RDMA/hns: Normalization the judgment of some features RDMA/hns: Limit the length of data copied between kernel and userspace RDMA/mlx4: Remove bogus dev_base_lock usage RDMA/uverbs: Fix incorrect variable type RDMA/core: Do not indicate device ready when device enablement fails RDMA/core: Clean up cq pool mechanism RDMA/core: Update kernel documentation for ib_create_named_qp() MAINTAINERS: SOFT-ROCE: Change Zhu Yanjun's email address ...

Linus Torvalds committed 5 years ago

Commit 009bd552 parents 60f7c50 e246b7c175 files · +3845 −3915Browse files

Showing the changes to kernel (3 of 175 files). Show all

Unified · Split

3 files
  1. kernel/dma/Kconfig +0 −5
  2. kernel/dma/Makefile +0 −1
  3. kernel/dma/virt.c +0 −61
kernel/dma/Kconfig+0−5
@@ -75,11 +75,6 @@ config ARCH_HAS_DMA_PREP_COHERENT · 74 unmodified lines
75config ARCH_HAS_FORCE_DMA_UNENCRYPTED75config ARCH_HAS_FORCE_DMA_UNENCRYPTED
76 bool76 bool
77 77
78config DMA_VIRT_OPS
79 bool
80 depends on HAS_DMA
81 select DMA_OPS
82
83config SWIOTLB78config SWIOTLB
84 bool79 bool
85 select NEED_DMA_MAP_STATE80 select NEED_DMA_MAP_STATE
kernel/dma/Makefile+0−1
@@ -5,7 +5,6 @@ obj-$(CONFIG_DMA_OPS) += ops_helpers.o · 4 unmodified lines
5obj-$(CONFIG_DMA_OPS) += dummy.o5obj-$(CONFIG_DMA_OPS) += dummy.o
6obj-$(CONFIG_DMA_CMA) += contiguous.o6obj-$(CONFIG_DMA_CMA) += contiguous.o
7obj-$(CONFIG_DMA_DECLARE_COHERENT) += coherent.o7obj-$(CONFIG_DMA_DECLARE_COHERENT) += coherent.o
8obj-$(CONFIG_DMA_VIRT_OPS) += virt.o
9obj-$(CONFIG_DMA_API_DEBUG) += debug.o8obj-$(CONFIG_DMA_API_DEBUG) += debug.o
10obj-$(CONFIG_SWIOTLB) += swiotlb.o9obj-$(CONFIG_SWIOTLB) += swiotlb.o
11obj-$(CONFIG_DMA_COHERENT_POOL) += pool.o10obj-$(CONFIG_DMA_COHERENT_POOL) += pool.o
kernel/dma/virt.c+0−61
@@ -1,61 +0,0 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * DMA operations that map to virtual addresses without flushing memory.
4 */
5#include <linux/export.h>
6#include <linux/mm.h>
7#include <linux/dma-map-ops.h>
8#include <linux/scatterlist.h>
9
10static void *dma_virt_alloc(struct device *dev, size_t size,
11 dma_addr_t *dma_handle, gfp_t gfp,
12 unsigned long attrs)
13{
14 void *ret;
15
16 ret = (void *)__get_free_pages(gfp | __GFP_ZERO, get_order(size));
17 if (ret)
18 *dma_handle = (uintptr_t)ret;
19 return ret;
20}
21
22static void dma_virt_free(struct device *dev, size_t size,
23 void *cpu_addr, dma_addr_t dma_addr,
24 unsigned long attrs)
25{
26 free_pages((unsigned long)cpu_addr, get_order(size));
27}
28
29static dma_addr_t dma_virt_map_page(struct device *dev, struct page *page,
30 unsigned long offset, size_t size,
31 enum dma_data_direction dir,
32 unsigned long attrs)
33{
34 return (uintptr_t)(page_address(page) + offset);
35}
36
37static int dma_virt_map_sg(struct device *dev, struct scatterlist *sgl,
38 int nents, enum dma_data_direction dir,
39 unsigned long attrs)
40{
41 int i;
42 struct scatterlist *sg;
43
44 for_each_sg(sgl, sg, nents, i) {
45 BUG_ON(!sg_page(sg));
46 sg_dma_address(sg) = (uintptr_t)sg_virt(sg);
47 sg_dma_len(sg) = sg->length;
48 }
49
50 return nents;
51}
52
53const struct dma_map_ops dma_virt_ops = {
54 .alloc = dma_virt_alloc,
55 .free = dma_virt_free,
56 .map_page = dma_virt_map_page,
57 .map_sg = dma_virt_map_sg,
58 .alloc_pages = dma_common_alloc_pages,
59 .free_pages = dma_common_free_pages,
60};
61EXPORT_SYMBOL(dma_virt_ops);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t