From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49408C4741F for ; Thu, 5 Nov 2020 17:00:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8D6520756 for ; Thu, 5 Nov 2020 17:00:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728523AbgKERAK (ORCPT ); Thu, 5 Nov 2020 12:00:10 -0500 Received: from verein.lst.de ([213.95.11.211]:47871 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbgKERAK (ORCPT ); Thu, 5 Nov 2020 12:00:10 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 0E0A568B02; Thu, 5 Nov 2020 18:00:05 +0100 (CET) Date: Thu, 5 Nov 2020 18:00:04 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Jason Gunthorpe , Zhu Yanjun , Dennis Dalessandro , linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org, Mike Marciniszyn , iommu@lists.linux-foundation.org, Bjorn Helgaas , Bernard Metzler , Logan Gunthorpe Subject: Re: [PATCH 1/6] RMDA/sw: don't allow drivers using dma_virt_ops on highmem configs Message-ID: <20201105170004.GA7502@lst.de> References: <20201105074205.1690638-1-hch@lst.de> <20201105074205.1690638-2-hch@lst.de> <40d0a990-0fca-6f12-16ff-3612a9847ab3@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40d0a990-0fca-6f12-16ff-3612a9847ab3@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, Nov 05, 2020 at 12:15:46PM +0000, Robin Murphy wrote: > On 2020-11-05 07:42, Christoph Hellwig wrote: >> dma_virt_ops requires that all pages have a kernel virtual address. >> Introduce a INFINIBAND_VIRT_DMA Kconfig symbol that depends on !HIGHMEM >> and a large enough dma_addr_t, and make all three driver depend on the >> new symbol. >> >> Signed-off-by: Christoph Hellwig >> --- >> drivers/infiniband/Kconfig | 6 ++++++ >> drivers/infiniband/sw/rdmavt/Kconfig | 3 ++- >> drivers/infiniband/sw/rxe/Kconfig | 2 +- >> drivers/infiniband/sw/siw/Kconfig | 1 + >> 4 files changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig >> index 32a51432ec4f73..81acaf5fb5be67 100644 >> --- a/drivers/infiniband/Kconfig >> +++ b/drivers/infiniband/Kconfig >> @@ -73,6 +73,12 @@ 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 >> + bool >> + default y >> + depends on !HIGHMEM >> + depends on !64BIT || ARCH_DMA_ADDR_T_64BIT > > Isn't that effectively always true now since 4965a68780c5? I had a quick > try of manually overriding CONFIG_ARCH_DMA_ADDR_T_64BIT in my .config, and > the build just forces it back to "=y". True. The guy who did the commit should have really told me about it :)