Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1708918pxb; Mon, 8 Mar 2021 04:36:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXpxX45P8PT62WaTAd7J1gXxmFkMzRwDZuHIh1YNpTPt9yLTDGCeKmZZQW5hvTbihFFAXz X-Received: by 2002:a17:906:5012:: with SMTP id s18mr14216728ejj.100.1615206963045; Mon, 08 Mar 2021 04:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615206963; cv=none; d=google.com; s=arc-20160816; b=oCqNV03oaxuAaWrMPyCwkgxWe7/Ik7+RkvWWfND6f/5gw83+VX6fUvelzeY2vQJ6Aj We1pNPnjwM2ei5YisVt7SjHiCmpgJE6zhR1GGs4hzQO4S/83npDDYouE7rIIMExYpXqw vtClARhLwK3u7vlraMtY7Zlr8Ib/PmWVbv+sVovwuDmMcriYF4IGLsfisTws20PtM1q1 62NC9b47bffhjqxMmkPL4WloNv29qN8+9gVJP4TYFt8OdL7KILJYIKWKD7/t/Fln/t3f ZJEGZIVaI9SoyR5WEGT8c9CzZGv700c26wrRvgyc6t48xMPCZc+E8RQtprDimiFRkLNm qc0Q== 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=RGCG7ngtjKJ3O3u1aSxm4CejKu3eoBMTk5fGv/9xWRk=; b=wDAJgN4oAkY0YAJ3ERfBcTtqShNh2eSEfRmOu+155wqwRKW/u7/BDP6MbWuECuhMJS YWgjl2bciUo1jdigc/L6XazMMLppogjfX6OLtLiiRvpE874wA9lK4VXwtp2sHEKcS7ZM JUhCR9wfEdWzfJjYhrBEV5weMBAFouc2cF374YRvUySYQDXqCGLgvNxY1vz0INs7YGKl om7ztuw7UTNi9lxL46884Gtng3mbJYW8B9INtinkCghwC7Vigt+sp4oKpOAye50HE0pm lsIK6DiBTtxCcghpcX4KPvvotq8zFcIrfr0DfhC7Ar04DkngIgMU6a20xagazFWzMzol fyJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oJLbXfGV; 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 g23si6459322edh.11.2021.03.08.04.35.39; Mon, 08 Mar 2021 04:36:03 -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=oJLbXfGV; 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 S231203AbhCHMef (ORCPT + 99 others); Mon, 8 Mar 2021 07:34:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:42752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbhCHMeA (ORCPT ); Mon, 8 Mar 2021 07:34:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AE382651D3; Mon, 8 Mar 2021 12:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615206840; bh=wKkAHu82AqmqBxnZhs11MmkFTEA9bAr0eG/VyWNa1to=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJLbXfGVto3KJuhk+v56XvptmxBYqfStFrnq0NvCU48SQOyzWl0PK+Sd9CinGyRBS quMaid5qosxx+d+/hPhv2VOiyAJGPBEBtGjxzta4+LvNpPI3GujYCPbKBTa4hhsiIH UjQsXUWD1RAO2huhUrQa2S8SwZK9k06ho3RpKMpU= 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 24/42] arm64: mm: Move reserve_crashkernel() into mem_init() Date: Mon, 8 Mar 2021 13:30:50 +0100 Message-Id: <20210308122719.315066515@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 0a30c53573b07d5561457e41fb0ab046cd857da5 upstream crashkernel might reserve memory located in ZONE_DMA. We plan to delay ZONE_DMA's initialization after unflattening the devicetree and ACPI's boot table initialization, so move it later in the boot process. Specifically into bootmem_init() since request_standard_resources() depends on it. Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton Link: https://lore.kernel.org/r/20201119175400.9995-2-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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -386,8 +386,6 @@ void __init arm64_memblock_init(void) else arm64_dma32_phys_limit = PHYS_MASK + 1; - reserve_crashkernel(); - reserve_elfcorehdr(); high_memory = __va(memblock_end_of_DRAM() - 1) + 1; @@ -427,6 +425,12 @@ void __init bootmem_init(void) sparse_init(); zone_sizes_init(min, max); + /* + * request_standard_resources() depends on crashkernel's memory being + * reserved, so do it here. + */ + reserve_crashkernel(); + memblock_dump_all(); }