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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 32AE6CA9ECB for ; Thu, 31 Oct 2019 16:00:08 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE07B20873 for ; Thu, 31 Oct 2019 16:00:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE07B20873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 473qln2wrrzF667 for ; Fri, 1 Nov 2019 03:00:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=verein.lst.de; envelope-from=hch@lst.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 473qjH04FjzF5Qn for ; Fri, 1 Nov 2019 02:57:55 +1100 (AEDT) Received: by verein.lst.de (Postfix, from userid 2407) id 4F39B68BE1; Thu, 31 Oct 2019 16:57:50 +0100 (CET) Date: Thu, 31 Oct 2019 16:57:50 +0100 From: Christoph Hellwig To: Nicolas Saenz Julienne Subject: Re: [PATCH] dma/direct: turn ARCH_ZONE_DMA_BITS into a variable Message-ID: <20191031155750.GA7394@lst.de> References: <20191031152837.15253-1-nsaenzjulienne@suse.de> <20191031154759.GA7162@lst.de> <40d06d463c05d36968e8b64924d78f7794f8de50.camel@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40d06d463c05d36968e8b64924d78f7794f8de50.camel@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, Vasily Gorbik , Will Deacon , Catalin Marinas , linuxppc-dev@lists.ozlabs.org, Heiko Carstens , linux-kernel@vger.kernel.org, Christian Borntraeger , iommu@lists.linux-foundation.org, Paul Mackerras , Robin Murphy , Christoph Hellwig , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Oct 31, 2019 at 04:53:13PM +0100, Nicolas Saenz Julienne wrote: > > > +#define ARM64_ZONE_DMA_BITS 30 > > > + > > > /* > > > * We need to be able to catch inadvertent references to memstart_addr > > > * that occur (potentially in generic code) before arm64_memblock_init() > > > @@ -424,6 +427,8 @@ void __init arm64_memblock_init(void) > > > else > > > arm64_dma_phys_limit = PHYS_MASK + 1; > > > > > > + zone_dma_bits = ARM64_ZONE_DMA_BITS; > > > + > > > reserve_crashkernel(); > > > > This actually adds a new limit, as there wasn't one before for arm64. > > Well, as zone_dma_bits is only relevant in dma/direct when ZONE_DMA is defined > I figured it doesn't matter if the variable is set conditionally to ZONE_DMA or > not. I'd much prefer that to do separately.