Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp639125pxb; Thu, 19 Nov 2020 09:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAsVxVXhvrSQ1BTri35hGtMCgHxiCDiccuR8a5EEpUPbu6IxwooPznpcAEtbLvlmDvnOUY X-Received: by 2002:a17:906:4705:: with SMTP id y5mr28827841ejq.112.1605808766708; Thu, 19 Nov 2020 09:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605808766; cv=none; d=google.com; s=arc-20160816; b=fAWKHCzc8kjU1cm66o6xrebo2xUSONlqzXVBVyp/MGMyv60DMPuo/TtQTZJKEEXRtj bVEXEGz+BffChT6z0rHJRfHy+2ZgZs8x+XTn7AkKOQ8YkMuiHR39ZSArpZgbRHTql7VZ slbamvyfPpjBE2A8oO/7LD0Ng8d6IqDgBg2AKR10STqg+tuzYqrxBLrF/GZYQlSp3vee OI7svmSxLbozCYyTqjvey5Np8MIxZ4BwQ7oMQ0bLOwpPG56U3aT42U2mNxE7GXCAmyRz trr6XbS7x7DF+49Ji/CvbnCDGIOJ+JzsQg4DHMGHrBvT/uwIt0USiXyxuEfs+sxMOenb FVzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9i8Cbpr2uciKdidDAsSdsjdZsGQVJLFyCuJ2IM9jjf8=; b=OiFH27pTdy9qIUQ9nVsgmx+7N66DzDJ/hR3qJ/uQ4hv4vI1bkY5mAx9Qug9PR+m0Zq Zp1hr8ldn5D5aHaZIsvsVoiieGT8PcoZTjcSIPvNW5k4GQZkgt6SBBhMJ9tMO/uRqxqH MnT92RZ1Eoj2ZV5JsRDLQJ6VAk3QtxvViWsCFGyMcjXHy83v9UlSt90x3E9T3YRxWTff qYNRWL2KUCX+KNQVQLRfMDnyp4YbNnO8Y4Ke+01E1ZcsC9M9PtswQuZT7EEhcEr/+c2K Ul+/SKHhhDZ1vlY0NHGNvqdd+pcTp86VeesE1a7TVin95aCWWq6GHje4zHE76E7Q+jBz 8WZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si239471ejg.51.2020.11.19.09.59.02; Thu, 19 Nov 2020 09:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729624AbgKSRy2 (ORCPT + 99 others); Thu, 19 Nov 2020 12:54:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:40718 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729335AbgKSRyJ (ORCPT ); Thu, 19 Nov 2020 12:54:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D67BFACEB; Thu, 19 Nov 2020 17:54:07 +0000 (UTC) From: Nicolas Saenz Julienne To: robh+dt@kernel.org, catalin.marinas@arm.com, hch@lst.de, ardb@kernel.org, linux-kernel@vger.kernel.org Cc: robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, jeremy.linton@arm.com, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, will@kernel.org, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, Nicolas Saenz Julienne Subject: [PATCH v7 2/7] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() Date: Thu, 19 Nov 2020 18:53:54 +0100 Message-Id: <20201119175400.9995-3-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201119175400.9995-1-nsaenzjulienne@suse.de> References: <20201119175400.9995-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org zone_dma_bits's initialization happens earlier that it's actually needed, in arm64_memblock_init(). So move it into the more suitable zone_sizes_init(). Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton --- arch/arm64/mm/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index fafdf992fd32..0954ea736987 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -190,6 +190,8 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) unsigned long max_zone_pfns[MAX_NR_ZONES] = {0}; #ifdef CONFIG_ZONE_DMA + zone_dma_bits = ARM64_ZONE_DMA_BITS; + arm64_dma_phys_limit = max_zone_phys(zone_dma_bits); max_zone_pfns[ZONE_DMA] = PFN_DOWN(arm64_dma_phys_limit); #endif #ifdef CONFIG_ZONE_DMA32 @@ -379,11 +381,6 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); - if (IS_ENABLED(CONFIG_ZONE_DMA)) { - zone_dma_bits = ARM64_ZONE_DMA_BITS; - arm64_dma_phys_limit = max_zone_phys(ARM64_ZONE_DMA_BITS); - } - if (IS_ENABLED(CONFIG_ZONE_DMA32)) arm64_dma32_phys_limit = max_zone_phys(32); else -- 2.29.2