Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2597595imj; Mon, 11 Feb 2019 05:39:54 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaz7WbSFrMMjB9z198EXialyhI+3HfaIh4netMgqgUhWmYZMe2EwOKLp+noVWCsyDD/BeTh X-Received: by 2002:a63:c303:: with SMTP id c3mr18848113pgd.268.1549892394320; Mon, 11 Feb 2019 05:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549892394; cv=none; d=google.com; s=arc-20160816; b=CSqSvXBJmxleCAKDFP5UGxWgKC+Fo6x4380orpSprQmhmJ0fbxx7u8qgwOLjlDbO85 zMowmg0nhsuDzB4PTwZYK7Qpf0tku7strarJiPH4iM7v2jcZLVKATpYH2/mn263ghxlv nFb93qCl1ltrWuD0RqhBwRISECXS7dKMHDXFU2+KbqhW2CiztXPniMke5wvIILb+5Q+5 YyCJJs1lBmeNe9b8NrG7nopXc5+7OMsftirS1XtTrQjCKDJjxamhGVFuTJyhGjyuWtFv 5EAHC7RAriLVP6VYHtJoZeqxHLA8Nr+K57ryDC6e0FvX9KaXeec/LRS3NYj82a6YZWvh DrnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vaPM4/bccvT+rZroXv0xEoOTtwzsa4y66Qg+Go48al4=; b=nk9Z69eQCbn+Dw3wtLO4P/8mTwQ86iuh8Dym4SL5TtLDrGHMDT84BZcuPyaJqFtBlo ILltfjaoAfXxqlCC7lD6YeQVPxPPpVjFqCxB1VdF8/Bdo+DepEKA6MShptJb8HlpTImH 3Ffzyzwf4cr1bqTFOnn4TjmM+B5HoNDoVD1ScJhqfG8tnxM357q2tcv2iEtOKNzmccjH 3D0atw3QWgzlI9Q2u7svdagWlBC1zu8S16/cl4cBq67hmu3BW7FAYSuTksdvK6FA2TFM j777SNAqzvVJTiZC6qE6J+yIlDKaLq7nBTQ9tCxGHB3307Qm+GTgXxFl0HIV6SNwk6h7 UTMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uvaquqUS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si9005601pgv.472.2019.02.11.05.39.38; Mon, 11 Feb 2019 05:39:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uvaquqUS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728041AbfBKNhg (ORCPT + 99 others); Mon, 11 Feb 2019 08:37:36 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:46920 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbfBKNgU (ORCPT ); Mon, 11 Feb 2019 08:36:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type: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=vaPM4/bccvT+rZroXv0xEoOTtwzsa4y66Qg+Go48al4=; b=uvaquqUSh2Ow37z544oSsbI9Qk EfPePoMUoj+/DV9tKyCa4QeCLCkNLS/+T+QUVK1nNF/2lUflB31xsjHyJ8kCd488elcmH/949whOo 9w5i+Upp2RHuOHDJlc3j/oxO+P00+Sx7RF2LHKQWPtF7lmlfa/KTf6QiQi0V6Lae7FEJR7tXZ8heJ qpwA+rWeakUvJkzpS1y891++4AKg74/x2BdZXm2UHRBa1sId8PuoiTUpvX8FB/xwihNunBI2ZQ50p yn8hM6cXvYB7Ieh8Dxq6Cdlk3oPwgMzSzJYA0kHj9IRZY2ZfIG5yC4mQMcIlG7uaKVMO6an7QYgUf +Huk1hRA==; Received: from 089144210182.atnat0019.highway.a1.net ([89.144.210.182] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtBko-0008UY-6H; Mon, 11 Feb 2019 13:36:10 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: Greg Kroah-Hartman , Lee Jones , x86@kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/12] of: select OF_RESERVED_MEM automatically Date: Mon, 11 Feb 2019 14:35:46 +0100 Message-Id: <20190211133554.30055-5-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211133554.30055-1-hch@lst.de> References: <20190211133554.30055-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The OF_RESERVED_MEM can be used if we have either CMA or the generic declare coherent code built and we support the early flattened DT. So don't bother making it a user visible options that is selected by most configs that fit the above category, but just select it when the requirements are met. Signed-off-by: Christoph Hellwig --- arch/arc/Kconfig | 1 - arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/csky/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/xtensa/Kconfig | 1 - drivers/of/Kconfig | 5 ++--- 7 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 376366a7db81..4103f23b6cea 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -44,7 +44,6 @@ config ARC select MODULES_USE_ELF_RELA select OF select OF_EARLY_FLATTREE - select OF_RESERVED_MEM select PCI_SYSCALL if PCI select PERF_USE_VMALLOC if ARC_CACHE_VIPT_ALIASING diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 664e918e2624..9395f138301a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -101,7 +101,6 @@ config ARM select MODULES_USE_ELF_REL select NEED_DMA_MAP_STATE select OF_EARLY_FLATTREE if OF - select OF_RESERVED_MEM if OF select OLD_SIGACTION select OLD_SIGSUSPEND3 select PCI_SYSCALL if PCI diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a4168d366127..1d22e969bdcb 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -163,7 +163,6 @@ config ARM64 select NEED_SG_DMA_LENGTH select OF select OF_EARLY_FLATTREE - select OF_RESERVED_MEM select PCI_DOMAINS_GENERIC if PCI select PCI_ECAM if (ACPI && PCI) select PCI_SYSCALL if PCI diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 398113c845f5..0a9595afe9be 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -42,7 +42,6 @@ config CSKY select MODULES_USE_ELF_RELA if MODULES select OF select OF_EARLY_FLATTREE - select OF_RESERVED_MEM select PERF_USE_VMALLOC if CPU_CK610 select RTC_LIB select TIMER_OF diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2890d36eb531..5cc4eea362c6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -233,7 +233,6 @@ config PPC select NEED_SG_DMA_LENGTH select OF select OF_EARLY_FLATTREE - select OF_RESERVED_MEM select OLD_SIGACTION if PPC32 select OLD_SIGSUSPEND select PCI_DOMAINS if PCI diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 20a0756f27ef..e242a405151e 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -447,7 +447,6 @@ config USE_OF bool "Flattened Device Tree support" select OF select OF_EARLY_FLATTREE - select OF_RESERVED_MEM help Include support for flattened device tree machine descriptions. diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index ad3fcad4d75b..3607fd2810e4 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -81,10 +81,9 @@ config OF_MDIO OpenFirmware MDIO bus (Ethernet PHY) accessors config OF_RESERVED_MEM - depends on OF_EARLY_FLATTREE bool - help - Helpers to allow for reservation of memory regions + depends on OF_EARLY_FLATTREE + default y if HAVE_GENERIC_DMA_COHERENT || DMA_CMA config OF_RESOLVE bool -- 2.20.1