Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4853666pxu; Wed, 21 Oct 2020 07:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTUkFUZvhC8kZdaB89dOKm4UiWxqFX0q8jL80Xm38j1TOOQmGptW7WGPz4F6jfZ3JIk4OR X-Received: by 2002:a17:906:7a51:: with SMTP id i17mr3654387ejo.234.1603288929704; Wed, 21 Oct 2020 07:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603288929; cv=none; d=google.com; s=arc-20160816; b=TaN+sP+l895pWZFr0zTsjns9gvEo89SaxttTMjep+aky4hyJE887F9162lqE2Dz8AT L4SRnfYc8KFXPCoj92W5nna3ANhKPC5YNwJ8B45Jg3fuC0iCaKKHjdbC6XTwuDNIlyKE nRZCLbRdQftcSbHr30GhZyiqo3nZmUnTfT6qk6AeG3CoiftqAmOLvVOZB/KcojB559Ew cPc6DFjIDEk3EF12roJTksTQoMplg+WW0FA4qnZbU2uCJDkEcl3dvvMH3f1SKy22VbZW rC9Cj8PLx3xE8ICGROF/1A0ZKfh0gCIa+Gl+9Bc3zuSQyvCKALPlfIecZoHll4GNOlKi ND6Q== 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=mbUVVFviPLs+C90vQjkjzw2YNC3ENiQW8BZR2BXNsJ8=; b=pNc5pG+i8NNUhvfQ/nWX1XzIelCQioHM1SADUfb4LH9b2ZQXSZcjRH231Sff6fWe68 t2w2mpE9EqRg+PQbiYhISAy7HuxFWhHCJHjrHAbiEu3gKbcsSsQ/HRNwhFmPzUntBmaq 3J8hYoI3Fbw4ixyxwFsfc59ViFUaTCUm/Mr6hDdNnJrU4fqBz/uh14AlllwnAPoxEVct 9YKf4ECkC1G7icCkyBp6SXAHBJ5KmpTCu7t3IeK8360LJE68PoNOkETAPTduGJxvtKRf bibVVJUGtXFTETlJpHgUm0n8+xt7QnXRZKT7/y2n6lAT1znqWZawAoFjFbAcbS7D8K0B Ojcg== 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 3si1360796ejz.513.2020.10.21.07.01.46; Wed, 21 Oct 2020 07:02:09 -0700 (PDT) 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 S2442392AbgJUMfc (ORCPT + 99 others); Wed, 21 Oct 2020 08:35:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:50762 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440437AbgJUMf3 (ORCPT ); Wed, 21 Oct 2020 08:35:29 -0400 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 5D72AAEB6; Wed, 21 Oct 2020 12:35:27 +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 v4 1/7] arm64: mm: Move reserve_crashkernel() into mem_init() Date: Wed, 21 Oct 2020 14:34:31 +0200 Message-Id: <20201021123437.21538-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201021123437.21538-1-nsaenzjulienne@suse.de> References: <20201021123437.21538-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 mem_init(), this is the last place crashkernel will be able to reserve the memory before the page allocator kicks in. There isn't any apparent reason for doing this earlier. Signed-off-by: Nicolas Saenz Julienne --- arch/arm64/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 095540667f0f..fc4ab0d6d5d2 100644 --- 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; @@ -508,6 +506,8 @@ void __init mem_init(void) else swiotlb_force = SWIOTLB_NO_FORCE; + reserve_crashkernel(); + set_max_mapnr(max_pfn - PHYS_PFN_OFFSET); #ifndef CONFIG_SPARSEMEM_VMEMMAP -- 2.28.0