From patchwork Wed Apr 25 05:15:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10361541 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B511C601BE for ; Wed, 25 Apr 2018 05:16:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A758E28B8B for ; Wed, 25 Apr 2018 05:16:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BEE128F2A; Wed, 25 Apr 2018 05:16:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A21128B8B for ; Wed, 25 Apr 2018 05:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbeDYFQJ (ORCPT ); Wed, 25 Apr 2018 01:16:09 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51484 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbeDYFQH (ORCPT ); Wed, 25 Apr 2018 01:16:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VfcP5zm97pEmg43rvyMX4uia/pGIwogHOyxkcDSIvSE=; b=BlyO0dsJFyzLTFL4MxGNF3/PL sxG3vSqpP86AO5JsqgOxTnMJEaNGOUHeA+n4qzDaWn+sFN8EyynmyuS9qfWhq7mgZdWDJ4dd6tREn tly+a5sJUXcmo4qA4y2lQtsqNimJrZ6qqXhNX0gdiuPz6u85ukE4YfdNtrlH0RApi2b+MpMCTy1n0 v6ebmY1gKbUuwwTzChps1zDWvCqrJqakKpb31x2sdxLkwi3AcJF+gqYRr3teHaBo21kMt3rigB7mE CIWoMaKuhj/EiWIYaufuYcbIHSwJSB8wFxio6qk6K6f+kMohfjdVMSdtmKGS3Zv3bfcjZgPIzwIen sCroIXoZw==; Received: from [93.83.86.253] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBCmY-00055q-Oj; Wed, 25 Apr 2018 05:15:55 +0000 From: Christoph Hellwig To: Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org Cc: sstabellini@kernel.org, x86@kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/13] iommu-helper: move the IOMMU_HELPER config symbol to lib/ Date: Wed, 25 Apr 2018 07:15:30 +0200 Message-Id: <20180425051539.1989-5-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425051539.1989-1-hch@lst.de> References: <20180425051539.1989-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This way we have one central definition of it, and user can select it as needed. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- arch/powerpc/Kconfig | 4 +--- arch/s390/Kconfig | 5 ++--- arch/sparc/Kconfig | 5 +---- arch/x86/Kconfig | 6 ++---- lib/Kconfig | 3 +++ 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 43e3c8e4e7f4..7698cf89af9c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -223,6 +223,7 @@ config PPC select HAVE_SYSCALL_TRACEPOINTS select HAVE_VIRT_CPU_ACCOUNTING select HAVE_IRQ_TIME_ACCOUNTING + select IOMMU_HELPER if PPC64 select IRQ_DOMAIN select IRQ_FORCED_THREADING select MODULES_USE_ELF_RELA @@ -478,9 +479,6 @@ config MPROFILE_KERNEL depends on PPC64 && CPU_LITTLE_ENDIAN def_bool !DISABLE_MPROFILE_KERNEL -config IOMMU_HELPER - def_bool PPC64 - config SWIOTLB bool "SWIOTLB support" default n diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 199ac3e4da1d..60c4ab854182 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -709,7 +709,9 @@ config QDIO menuconfig PCI bool "PCI support" select PCI_MSI + select IOMMU_HELPER select IOMMU_SUPPORT + help Enable PCI support. @@ -733,9 +735,6 @@ config PCI_DOMAINS config HAS_IOMEM def_bool PCI -config IOMMU_HELPER - def_bool PCI - config NEED_SG_DMA_LENGTH def_bool PCI diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 8767e45f1b2b..44e0f3cd7988 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -67,6 +67,7 @@ config SPARC64 select HAVE_SYSCALL_TRACEPOINTS select HAVE_CONTEXT_TRACKING select HAVE_DEBUG_KMEMLEAK + select IOMMU_HELPER select SPARSE_IRQ select RTC_DRV_CMOS select RTC_DRV_BQ4802 @@ -106,10 +107,6 @@ config ARCH_DMA_ADDR_T_64BIT bool default y if ARCH_ATU -config IOMMU_HELPER - bool - default y if SPARC64 - config STACKTRACE_SUPPORT bool default y if SPARC64 diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index cb2c7ecc1fea..fe9713539166 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -871,6 +871,7 @@ config DMI config GART_IOMMU bool "Old AMD GART IOMMU support" + select IOMMU_HELPER select SWIOTLB depends on X86_64 && PCI && AMD_NB ---help--- @@ -892,6 +893,7 @@ config GART_IOMMU config CALGARY_IOMMU bool "IBM Calgary IOMMU support" + select IOMMU_HELPER select SWIOTLB depends on X86_64 && PCI ---help--- @@ -929,10 +931,6 @@ config SWIOTLB with more than 3 GB of memory. If unsure, say Y. -config IOMMU_HELPER - def_bool y - depends on CALGARY_IOMMU || GART_IOMMU - config MAXSMP bool "Enable Maximum number of SMP Processors and NUMA Nodes" depends on X86_64 && SMP && DEBUG_KERNEL diff --git a/lib/Kconfig b/lib/Kconfig index 5fe577673b98..2f6908577534 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -429,6 +429,9 @@ config SGL_ALLOC bool default n +config IOMMU_HELPER + bool + config DMA_DIRECT_OPS bool depends on HAS_DMA && (!64BIT || ARCH_DMA_ADDR_T_64BIT)