Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4316862imj; Tue, 12 Feb 2019 13:43:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZpf0ugQthPhKHQIeK3SdMzTDSlGiIY21ser78FUKdoMJ7uOfll+1wj/PHViaTBrMv9awhi X-Received: by 2002:a17:902:33c1:: with SMTP id b59mr6090454plc.220.1550007821373; Tue, 12 Feb 2019 13:43:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550007821; cv=none; d=google.com; s=arc-20160816; b=jrCEHUJ2yIQs8/8SyF6KpSd0Mzq6MJEMR00MZ3PsBFUpJscjHIkujFhvlwtLnmy0Zk U1mLARPFZiglXW9L2DOq2tANOeijzLN5zecI7/z6pGF5ptJ6QYDL3WyFf8WAXTmOOj+R P30fHTY02ntj2qaZy2flwFWq71DBirWqdYRCdtM84aUNAwkFmsNibsdYEuDMUxkeH4XB ksLbNhjHnIs+RNOTMorkTKb7qDZMhr8vnKGFFFgzZd0EDzUkaFb30vNetj1lKf7KZThZ vpMOC5YX+OpP9u26Rb8PB1qEkHgleGkfP9yj9V+Qx5tBQmaHCwqjxapZ7tEkbJlF1Wsb GMhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uLqsK65SphYwuoGDZMpAYHloV6WWbW2y6/BNwowNLI4=; b=E7H2Az2Ttdgp4sgowxzemkwVTxC17BZDzwA7wPP/jhs78XT9JakGCipeb1WLPsDzi8 MjWXefwd9eLOCiaD6SA7jro57p/Tb0AZA0rLXanwh/7CDepbjsW2QXuj/8IxaZsj25/0 DI0I0mPXbm3K+j5+H53ptzbCxw8Oi68Qsw7HsPX9Swz3ZpFYHu3uahUzrcHDCfFi7TBV y1CHkagwUDysd31btnKVSS55Q3ZVLJr4xmmj7YT4b8tYEMUaR+Aku6GiotFIyeedoM5t T+AsrIJh31rCsbbV8OdsWa1btlEzMoyTvXRLakumaC09nygYEm5TBIXNSYH4a/4NfAIj lzaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="QfKA6/6/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si6103827pll.219.2019.02.12.13.43.17; Tue, 12 Feb 2019 13:43:41 -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=pass header.i=@kernel.org header.s=default header.b="QfKA6/6/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731177AbfBLUkh (ORCPT + 99 others); Tue, 12 Feb 2019 15:40:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:48514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728097AbfBLUkh (ORCPT ); Tue, 12 Feb 2019 15:40:37 -0500 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DEB6C222C1; Tue, 12 Feb 2019 20:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550004036; bh=vjjmB3q5kxynqTfBl4fMXnJzLtFOe/CWMrbnP/HvubI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QfKA6/6/PzAH/1DTX5KyhQZjfr82FQxTeLuAkVGfvNPh0B5ZeDW8YW0zkx2oYKF8x js6uiZtrNajIS0RO2RaoERpXiSG8LLpOW2CofF7tRM0Ar6Gkfs/XYQaSDu8gGWSYkl fig/6HVAkxpsdIZs+cf77ZjUfMX0mfPMDlK+pctE= Received: by mail-qk1-f181.google.com with SMTP id p15so32107qkl.5; Tue, 12 Feb 2019 12:40:35 -0800 (PST) X-Gm-Message-State: AHQUAuYHGGs1wXuSsUGBXp8ozX/dUZkynyOS6a7M1g2AJOohE9vhUGBF wuA7bnET3pKio38fkFnhuKARby9t+wTW2G6UIQ== X-Received: by 2002:a37:5686:: with SMTP id k128mr3834629qkb.29.1550004035085; Tue, 12 Feb 2019 12:40:35 -0800 (PST) MIME-Version: 1.0 References: <20190211133554.30055-1-hch@lst.de> <20190211133554.30055-7-hch@lst.de> In-Reply-To: <20190211133554.30055-7-hch@lst.de> From: Rob Herring Date: Tue, 12 Feb 2019 14:40:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 06/12] dma-mapping: improve selection of dma_declare_coherent availability To: Christoph Hellwig Cc: Linux IOMMU , Greg Kroah-Hartman , Lee Jones , x86@kernel.org, arcml , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-mips@vger.kernel.org, linuxppc-dev , linux-riscv@lists.infradead.org, SH-Linux , linux-xtensa@linux-xtensa.org, devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 11, 2019 at 7:37 AM Christoph Hellwig wrote: > > This API is primarily used through DT entries, but two architectures > and two drivers call it directly. So instead of selecting the config > symbol for random architectures pull it in implicitly for the actual > users. Also rename the Kconfig option to describe the feature better. > > Signed-off-by: Christoph Hellwig > --- > arch/arc/Kconfig | 1 - > arch/arm/Kconfig | 2 +- > arch/arm64/Kconfig | 1 - > arch/csky/Kconfig | 1 - > arch/mips/Kconfig | 1 - > arch/riscv/Kconfig | 1 - > arch/sh/Kconfig | 2 +- > arch/unicore32/Kconfig | 1 - > arch/x86/Kconfig | 1 - > drivers/mfd/Kconfig | 2 ++ > drivers/of/Kconfig | 3 ++- > include/linux/device.h | 2 +- > include/linux/dma-mapping.h | 8 ++++---- > kernel/dma/Kconfig | 2 +- > kernel/dma/Makefile | 2 +- > 15 files changed, 13 insertions(+), 17 deletions(-) > diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > index 3607fd2810e4..f8c66a9472a4 100644 > --- a/drivers/of/Kconfig > +++ b/drivers/of/Kconfig > @@ -43,6 +43,7 @@ config OF_FLATTREE > > config OF_EARLY_FLATTREE > bool > + select DMA_DECLARE_COHERENT Is selecting DMA_DECLARE_COHERENT okay on UML? We run the unittests with UML. Maybe we should just get rid of OF_RESERVED_MEM. If we support booting from DT, then it should always be enabled anyways. > select OF_FLATTREE > > config OF_PROMTREE > @@ -83,7 +84,7 @@ config OF_MDIO > config OF_RESERVED_MEM > bool > depends on OF_EARLY_FLATTREE > - default y if HAVE_GENERIC_DMA_COHERENT || DMA_CMA > + default y if DMA_DECLARE_COHERENT || DMA_CMA > > config OF_RESOLVE > bool