Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp638018pxb; Thu, 19 Nov 2020 09:57:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqtQb7gV84LtnAMwfQ8QwWKTawUblTI+PD92mo5DKlTd+SwvU3UgZ9lRaXJvrevT4VAaAx X-Received: by 2002:a05:6402:c8d:: with SMTP id cm13mr30704106edb.340.1605808655713; Thu, 19 Nov 2020 09:57:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605808655; cv=none; d=google.com; s=arc-20160816; b=Qu4q1yf0d3fIyPjaX4IuEi7FssaP48WSiFraIp+ACEppOf0x0qhorWBncvEq/MPMsq LyJw83+iabuqs3XjhYQ5hEFDcciPE/Vpz3r3ZlZhu9eUNTkx8njejrFZZsSoJCBPb8yh 045MX+HgfQmGLyoB3y9ieulAGd6FXynBDDpbztuQ5XFB+fdWPz/HZEuo/kHO3bTbwqaB n8ISTxMF+VVgKtBEyJl2NSNi+4W0kK890SDPGr+NoRemrW77rKmpJxAhBuBScDntqUa2 Ul+Ii3hXie11kSPnWU9aV+fFMHZPAWD1nm1Z5knw+4k/uPydxHmneON3gA2HYxcd3pQM gE+w== 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=NHr7/mvAGkoV7g5Ex1AU4+AICsC6qZYTJV4mDzmhFGk=; b=GKCllJvnXD4zVM6ZKxfPyxSV8UjK2GnOpxpCArHvrscE2SV3qGjVT+p2bktDpkLPE1 mjlmZyEjkq8MfTNuxqe8yAUyMWYGkPWViIGIhXxvq/MNU/4dm+FWV2j7FjxiLSzQJYk1 l/r5hrDZX3kGvbpJjPzXF+5OklsNaMeUvXaaS/TifAOrvSeS2vzg2+OjKo8Q/SafsyyS ul7gG6YeAmujoPKwVsXl4TSBOAtyerBl0TFRXc7CNv2A54HNuhmRIJKa0Ksg+d55OnYH lEEDNigApcDVmCLuBJLhkHMaacPRRJd0vpq3NTzDB7c0s9+z9L961YzGs8dPBiOl4nEm XwWA== 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 s9si243964ejy.610.2020.11.19.09.57.11; Thu, 19 Nov 2020 09:57:35 -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 S1729578AbgKSRyJ (ORCPT + 99 others); Thu, 19 Nov 2020 12:54:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:40682 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727395AbgKSRyI (ORCPT ); Thu, 19 Nov 2020 12:54:08 -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 EA567AC2D; Thu, 19 Nov 2020 17:54:06 +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 1/7] arm64: mm: Move reserve_crashkernel() into mem_init() Date: Thu, 19 Nov 2020 18:53:53 +0100 Message-Id: <20201119175400.9995-2-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 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 --- Changes since v6: - Move crashkernel reserve placement earlier, in bootmem_init() arch/arm64/mm/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 71d463544400..fafdf992fd32 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -389,8 +389,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; @@ -430,6 +428,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(); } -- 2.29.2