Skip to content

Commit 4c954fe

Browse files
Christoph Hellwiggregkh
authored andcommitted
RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs
[ Upstream commit b1e678b ] dma_virt_ops requires that all pages have a kernel virtual address. Introduce a INFINIBAND_VIRT_DMA Kconfig symbol that depends on !HIGHMEM and make all three drivers depend on the new symbol. Also remove the ARCH_DMA_ADDR_T_64BIT dependency, which has been obsolete since commit 4965a68 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig") Fixes: 551199a ("lib/dma-virt: Add dma_virt_ops") Link: https://lore.kernel.org/r/20201106181941.1878556-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1a358c4 commit 4c954fe

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎drivers/infiniband/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ config INFINIBAND_ADDR_TRANS_CONFIGFS
8080
This allows the user to config the default GID type that the CM
8181
uses for each device, when initiaing new connections.
8282

83+
config INFINIBAND_VIRT_DMA
84+
def_bool !HIGHMEM
85+
8386
if INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
8487
source "drivers/infiniband/hw/mthca/Kconfig"
8588
source "drivers/infiniband/hw/qib/Kconfig"

‎drivers/infiniband/sw/rdmavt/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config INFINIBAND_RDMAVT
33
tristate "RDMA verbs transport library"
4-
depends on X86_64 && ARCH_DMA_ADDR_T_64BIT
4+
depends on INFINIBAND_VIRT_DMA
5+
depends on X86_64
56
depends on PCI
67
select DMA_VIRT_OPS
78
---help---

‎drivers/infiniband/sw/rxe/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
config RDMA_RXE
33
tristate "Software RDMA over Ethernet (RoCE) driver"
44
depends on INET && PCI && INFINIBAND
5-
depends on !64BIT || ARCH_DMA_ADDR_T_64BIT
5+
depends on INFINIBAND_VIRT_DMA
66
select NET_UDP_TUNNEL
77
select CRYPTO_CRC32
88
select DMA_VIRT_OPS

‎drivers/infiniband/sw/siw/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
config RDMA_SIW
22
tristate "Software RDMA over TCP/IP (iWARP) driver"
33
depends on INET && INFINIBAND && LIBCRC32C
4+
depends on INFINIBAND_VIRT_DMA
45
select DMA_VIRT_OPS
56
help
67
This driver implements the iWARP RDMA transport over

0 commit comments

Comments
 (0)