From patchwork Sun Apr 15 14:59:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 898261 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="Su+VnF0S"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40PF7B0zbwz9s19 for ; Mon, 16 Apr 2018 01:00:22 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbeDOPAT (ORCPT ); Sun, 15 Apr 2018 11:00:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59024 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752470AbeDOPAS (ORCPT ); Sun, 15 Apr 2018 11:00:18 -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=yTD/jJtNCoxiUonI9FFN4dyN7eP+XcTFKgCQf+Fwo0I=; b=Su+VnF0Sf6PG1EGmJeWF+YgRW L7830TaNcx5yeAJ4L02AuM4fQ+XXugORJyciTvdRgHBRHHQ5Q0nSqnmVzujvzhvWkmSVoD47swm7j JVpJgjOJxuyzJolf2GoYd2HgfyYNhNXxQTgcugfM909lZzlYQ7gj+vFV/uURq58F9l2+9szDeQZ/a 24GI0pKPb0eTxhDI1aMPH43X7ce616Yorio4CPpE3SXE0w/QqtVxo/OSnP602J0VEXQBccEstgX73 xYtzxC31JpFmNSQloJ8t43kbBw/fQ+BKcJ95QnJphEcsWGMn2KtoVnYV0W9OSI2Duxp63hAeWmRmw ki4A/0TRQ==; Received: from 089144200254.atnat0009.highway.a1.net ([89.144.200.254] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7j8M-0005fw-PC; Sun, 15 Apr 2018 15:00:03 +0000 From: Christoph Hellwig To: Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org Cc: x86@kernel.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, linux-ide@vger.kernel.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/12] iommu-helper: move the IOMMU_HELPER config symbol to lib/ Date: Sun, 15 Apr 2018 16:59:39 +0200 Message-Id: <20180415145947.1248-5-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180415145947.1248-1-hch@lst.de> References: <20180415145947.1248-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 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 eb23f2949bf6..3ca617cd4807 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 32a0d5b958bf..bfa449fdeb19 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -693,7 +693,9 @@ config QDIO menuconfig PCI bool "PCI support" select PCI_MSI + select IOMMU_HELPER select IOMMU_SUPPORT + help Enable PCI support. @@ -717,9 +719,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 336b1378ee62..06ca29e70d6b 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -870,6 +870,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--- @@ -891,6 +892,7 @@ config GART_IOMMU config CALGARY_IOMMU bool "IBM Calgary IOMMU support" + select IOMMU_HELPER select SWIOTLB depends on X86_64 && PCI ---help--- @@ -928,10 +930,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)