Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1854173pxb; Mon, 8 Mar 2021 07:57:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJqkfb5XhPnu0IHc0SukeCi/l37vmLIAUP2HcvlX36wy4Y90udBGgp9SOm8VyAQXKM4Tdo X-Received: by 2002:aa7:d642:: with SMTP id v2mr23038820edr.257.1615219070883; Mon, 08 Mar 2021 07:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615219070; cv=none; d=google.com; s=arc-20160816; b=JGjDnCJzJkCGO/tIKV0xPfWpUkmdBu5Dj4N5fwecvG+ZRZMeyhtA72n1bKk/rE066u BbB5KNJhA/Du6tOA8Bcca7gFwySOibf+gCsRZoB2nf66nnNnAseXGVXp4Lp/lgQcZZPc mrK8MJhLwT4y9uPRa9Xvn4vwYYnXcbqV5We1UG+rEqSleqoB7w+SnmvmUIox0cml3XSk LCOc/pfFgNwoIQMhfecvxMDWgwuz31ZKkH1qPnHrVqtdrIqDXCi5uzIjVBRuuf8Y/cEo uz0wjx3mwW3rud6LoOjFb19yNZeBhBz9+I0Mz5A8O4vnPB4XDbp9fl8AiivPqqSSsX43 6w0Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k9X5OYSWz4blWT1NT/u2rqE6QB2PNgHdWgIia67QeYQ=; b=mN2yBNImjn81AZ4lglER0HP4bzrixfclkxqWbtVGm5WfPfgtvlmLi7G/Me/7kPkqvY 3fhdq2YxPtIGikq73gXI6iyqO9UqyUwT0DqPe8RugaoULobDB0L9BS/Y7JT3kOmtRWm8 BkewpL/gaV4/JARLkoMSRvr/Pay9fmvcLC0oe4FJJ/vV86Kx6qU4y9JUmjA0u2SzjFND phdVtV0F/Y1HnZ0lcK4Nx3CzZZyATcSAY1+SE0Norc68wDLaVxBT/fDi3QAbPDC52tu/ TqTyEE9tvU1JOYzk/S31YR/UbEcrlKSsMbnr4vgqcH0XcMJ++9FxNi7fESauue9XMr0M yKtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CISCgB6k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si7387007edd.35.2021.03.08.07.57.28; Mon, 08 Mar 2021 07:57:50 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CISCgB6k; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbhCHMeh (ORCPT + 99 others); Mon, 8 Mar 2021 07:34:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:42772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbhCHMeD (ORCPT ); Mon, 8 Mar 2021 07:34:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F8AB651C3; Mon, 8 Mar 2021 12:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615206843; bh=rgtfOThl5RleC5R0DkgkKuXN24d/MZxjLtdFDzxwxTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CISCgB6k9xG/0G6YCufYgjNp4cij19x8wmLbuEqQpkSZ/VgMM4KWq/JwpDg8K2Bfh rPea+/DohbEQ1Myzs/azzWx6v/dEzSapLQbggb1XTGwsf8COG2vwFxpzbipnadZKbv odFinUyrEj44MRv0asy4ELRMSPH4xKrFEs/y3vc8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Saenz Julienne , Jeremy Linton , Catalin Marinas , Jing Xiangfeng Subject: [PATCH 5.10 25/42] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() Date: Mon, 8 Mar 2021 13:30:51 +0100 Message-Id: <20210308122719.366047742@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308122718.120213856@linuxfoundation.org> References: <20210308122718.120213856@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Saenz Julienne commit 9804f8c69b04a39d0ba41d19e6bdc6aa91c19725 upstream 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 Link: https://lore.kernel.org/r/20201119175400.9995-3-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng Signed-off-by: Greg Kroah-Hartman --- arch/arm64/mm/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -190,6 +190,8 @@ static void __init zone_sizes_init(unsig 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 @@ -376,11 +378,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