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=-8.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 078FBC388F9 for ; Tue, 27 Oct 2020 07:54:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEE6022263 for ; Tue, 27 Oct 2020 07:54:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2508437AbgJ0Hy6 (ORCPT ); Tue, 27 Oct 2020 03:54:58 -0400 Received: from verein.lst.de ([213.95.11.211]:37655 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2508410AbgJ0Hy4 (ORCPT ); Tue, 27 Oct 2020 03:54:56 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2FBB867373; Tue, 27 Oct 2020 08:54:53 +0100 (CET) Date: Tue, 27 Oct 2020 08:54:52 +0100 From: "hch@lst.de" To: "Song Bao Hua (Barry Song)" Cc: Robin Murphy , "hch@lst.de" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] dma: Per-NUMA-node CMA should depend on NUMA Message-ID: <20201027075452.GA22487@lst.de> References: <74b66725883f065eb7d156f866678abb5be934bd.1603714996.git.robin.murphy@arm.com> <75cad228694b4f1587265a887069b241@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75cad228694b4f1587265a887069b241@hisilicon.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2020 at 08:07:43PM +0000, Song Bao Hua (Barry Song) wrote: > > diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig > > index c99de4a21458..964b74c9b7e3 100644 > > --- a/kernel/dma/Kconfig > > +++ b/kernel/dma/Kconfig > > @@ -125,7 +125,8 @@ if DMA_CMA > > > > config DMA_PERNUMA_CMA > > bool "Enable separate DMA Contiguous Memory Area for each NUMA > > Node" > > - default NUMA && ARM64 > > + depends on NUMA > > + default ARM64 > > On the other hand, at this moment, only ARM64 is calling the init code > to get per_numa cma. Do we need to > depends on NUMA && ARM64 ? > so that this is not enabled by non-arm64? I actually hate having arch symbols in common code. A new ARCH_HAS_DMA_PERNUMA_CMA, only selected by arm64 for now would be more clean I think.