Received: by 2002:aa6:c429:0:b029:98:93ff:f56f with SMTP id g9csp3394031lkq; Mon, 23 Nov 2020 04:42:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzKYczQ3njudemFt/SNtQILujXdQtAa6bmlW2kjne3vKjpKVYMtltzZKxsaKYU4HMR5JWp X-Received: by 2002:a17:906:1e84:: with SMTP id e4mr26313911ejj.57.1606135357529; Mon, 23 Nov 2020 04:42:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606135357; cv=none; d=google.com; s=arc-20160816; b=e1dKAbbKGspnipjX3PP+6XPOv+2Qq/PxTDu3W3IiWsk98mz/ff+d1U4kXRCbBlcX3A B1jcNHn4xZAEGFHVQNe01SxXL7a7oQJUoCduQC4/AsS3KmXbrUR9RCO3wTjnjLZqlCLt T3D9v67LQLIBjFBW4dp2WJDiEgUyN5RlbKRlAuLINDVujZpbjysgemu4EY6HWuss/5ui y6T1aAQvVpizGJSc7ZChTc3yYa131pA1/QP4BRRb2xL1yeEIi9Gruyy9Cy1xPWSYu5QT KWhtfSYABeUmhJ/FQLahB0VYa7qaT+oUntlxwjvjVaVqqbw6eGe55XwW63HdnuptEM3S VRtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R87Fretz9/3uJuqQy1NEs8v6lskr0M7ChqmAGdz0Xxk=; b=K0YaD03VthyNZxrUy+J79/jBiuc1CXrAbg7bGpkbKoaXCz7ux6dSeY0MT/KKe2xLzk ovnpOuiwDLcNjonDwa9Abjs/r3WpnrilH7PA/wDi1hHQPtTzpC9edwnWf8+st7N/KRZ9 aGLHB7xoPNNiX7OMVBfFGWNpvTKONJGF6ABBOsC0GkfJGVDe4f49Fk25hPtcZVaBtHAX 2OQRsLHN6/Qzb5XY8P+1lDncuoKdBsu6XQ1w/h2To/2Zw4fvsgY+07wSvSRM7FOIZC1R 9i25caRhuQ8XJ6SRpeH612nvGCyephH7rJ3MpEz5aOD5bBCV2QXszkgDhGmz+VJwDqri hfOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wocvhvjy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si6428970ejg.543.2020.11.23.04.42.14; Mon, 23 Nov 2020 04:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wocvhvjy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731858AbgKWMhC (ORCPT + 99 others); Mon, 23 Nov 2020 07:37:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:48952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731802AbgKWMgq (ORCPT ); Mon, 23 Nov 2020 07:36:46 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDAD92065E; Mon, 23 Nov 2020 12:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606135006; bh=ZJ473heAd9xY0H2Po4S8QYK/ys5ev3M6yDXV1P7FQCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WocvhvjypzdIWZ1IjlV7kmksgoe9HqJIn7uwA5YJHhrguWh/aauQb6bwSVX3Qk7VG mUFUMIiTfcF8jZRRFj2DtQVa4MZV27iLqeMm++IUML7ZtBw+JIo4f2MWsqae6F/712 MIIVhF7miop27/REC/OGEjfbK0OvxG/Bd32j1uoY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.4 071/158] RMDA/sw: Dont allow drivers using dma_virt_ops on highmem configs Date: Mon, 23 Nov 2020 13:21:39 +0100 Message-Id: <20201123121823.362829671@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123121819.943135899@linuxfoundation.org> References: <20201123121819.943135899@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit b1e678bf290db5a76f1b6a9f7c381310e03440d6 ] 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 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig") Fixes: 551199aca1c3 ("lib/dma-virt: Add dma_virt_ops") Link: https://lore.kernel.org/r/20201106181941.1878556-2-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/Kconfig | 3 +++ drivers/infiniband/sw/rdmavt/Kconfig | 3 ++- drivers/infiniband/sw/rxe/Kconfig | 2 +- drivers/infiniband/sw/siw/Kconfig | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index b44b1c322ec82..786ee0e4e8855 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -80,6 +80,9 @@ config INFINIBAND_ADDR_TRANS_CONFIGFS This allows the user to config the default GID type that the CM uses for each device, when initiaing new connections. +config INFINIBAND_VIRT_DMA + def_bool !HIGHMEM + if INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS source "drivers/infiniband/hw/mthca/Kconfig" source "drivers/infiniband/hw/qib/Kconfig" diff --git a/drivers/infiniband/sw/rdmavt/Kconfig b/drivers/infiniband/sw/rdmavt/Kconfig index 1f2759c72108a..a297f13eb6664 100644 --- a/drivers/infiniband/sw/rdmavt/Kconfig +++ b/drivers/infiniband/sw/rdmavt/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config INFINIBAND_RDMAVT tristate "RDMA verbs transport library" - depends on X86_64 && ARCH_DMA_ADDR_T_64BIT + depends on INFINIBAND_VIRT_DMA + depends on X86_64 depends on PCI select DMA_VIRT_OPS ---help--- diff --git a/drivers/infiniband/sw/rxe/Kconfig b/drivers/infiniband/sw/rxe/Kconfig index d9bcfe7405888..71a773f607bbc 100644 --- a/drivers/infiniband/sw/rxe/Kconfig +++ b/drivers/infiniband/sw/rxe/Kconfig @@ -2,7 +2,7 @@ config RDMA_RXE tristate "Software RDMA over Ethernet (RoCE) driver" depends on INET && PCI && INFINIBAND - depends on !64BIT || ARCH_DMA_ADDR_T_64BIT + depends on INFINIBAND_VIRT_DMA select NET_UDP_TUNNEL select CRYPTO_CRC32 select DMA_VIRT_OPS diff --git a/drivers/infiniband/sw/siw/Kconfig b/drivers/infiniband/sw/siw/Kconfig index b622fc62f2cd6..3450ba5081df5 100644 --- a/drivers/infiniband/sw/siw/Kconfig +++ b/drivers/infiniband/sw/siw/Kconfig @@ -1,6 +1,7 @@ config RDMA_SIW tristate "Software RDMA over TCP/IP (iWARP) driver" depends on INET && INFINIBAND && LIBCRC32C + depends on INFINIBAND_VIRT_DMA select DMA_VIRT_OPS help This driver implements the iWARP RDMA transport over -- 2.27.0