Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4270110pxt; Wed, 11 Aug 2021 01:53:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyENG+nVPvA9UrkxlyOdFQNE5R/BRscUzlGcgRbDBGfUki+vDXJHXhb+lrSxrfI/90wo9E0 X-Received: by 2002:aa7:c857:: with SMTP id g23mr6713924edt.219.1628672020431; Wed, 11 Aug 2021 01:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628672020; cv=none; d=google.com; s=arc-20160816; b=FhvIAGjXgR5fVja5YZnhCCRd4/LlxzrdnVINWh8whxhPEdRIWTlr13TeDlp/h/hpT/ nvoRaU7qFh1BPo5W2GdpD3UqU27l/tXVn0NJQfqL9GCg3SqvQBAxrXPYMOcZMhlIpRfr s65tb65m53RRTNDKsIE5Klr64lmrm49n9DFFjItEMYqNj7G2CXk/TloDBZ75wSf717Fn v728sLPr3ZbzDTLbeEFaTwc8OKkOtRTp4vWsvbeqLJAR2R7ojJ8oEE0RmdK25uzHZsPd mtRsD8GX1iQkRfTyRb0nOQWRgIaaGd5EnevhaI8A96OpiFZxBgz+Bp7T5M7N9zlFWxi8 dGfA== 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=QYJSAwXBF2xnJGka66cRqy8ZaDotIuFBBXs3HFaVHPw=; b=pbgUn3z8gen4B51/feZmw4xNviZMsQ7EcN7wMaiBoCPZvoB6zjIzuqqEvk+8FHzKtw EaLx8xSfbKG7vtEMNALDzWySZd8fadRBlpBHp/zV79vdXg0mve2h+qHxztBVXvQm3BKB EVROejYYIJmRXsjp5lP09c1waEcIuVCGOdml8lGz8GUtHPlAujrXa4460xPcU2cSgLbd ykeBwO7X6PtgT/dUQjARwKKTtStjNg+0Rklv4Awlu2m4q6752MpgUAXUEtYhTLbkndIH I/Cy4qofPHEfisiXsekFVCg3/ASfMINCl7uvOqRZ1vmJSyh85a8TkfJgrhXAKw85SelP acIQ== 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 rh5si9598763ejb.293.2021.08.11.01.53.17; Wed, 11 Aug 2021 01:53:40 -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 S236648AbhHKIwI (ORCPT + 99 others); Wed, 11 Aug 2021 04:52:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236411AbhHKIv7 (ORCPT ); Wed, 11 Aug 2021 04:51:59 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93175C06179B for ; Wed, 11 Aug 2021 01:51:35 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:438:1ff1:1071:f524]) by xavier.telenet-ops.be with bizsmtp id g8rH2500H1gJxCh018rHUg; Wed, 11 Aug 2021 10:51:32 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mDjxF-001yaF-1h; Wed, 11 Aug 2021 10:51:17 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mDjxD-0058xR-F6; Wed, 11 Aug 2021 10:51:15 +0200 From: Geert Uytterhoeven To: Rob Herring , Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young Cc: Baoquan He , Vivek Goyal , Mike Rapoport , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v5 7/9] arm64: kdump: Remove custom linux,elfcorehdr handling Date: Wed, 11 Aug 2021 10:51:05 +0200 Message-Id: <3b8f801f9b92066855e87f3079fafc153ab20f69.1628670468.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the architecture-specific code for handling the "linux,elfcorehdr" property under the "/chosen" node in DT, as the platform-agnostic handling in the FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven --- v5: - Remove all handling, not just parsing, v4: - s/handlng/parsing/ in patch description. --- arch/arm64/mm/init.c | 53 -------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 8490ed2917ff2430..bac4f06bb7d900a2 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -124,57 +124,6 @@ static void __init reserve_crashkernel(void) } #endif /* CONFIG_KEXEC_CORE */ -#ifdef CONFIG_CRASH_DUMP -static int __init early_init_dt_scan_elfcorehdr(unsigned long node, - const char *uname, int depth, void *data) -{ - const __be32 *reg; - int len; - - if (depth != 1 || strcmp(uname, "chosen") != 0) - return 0; - - reg = of_get_flat_dt_prop(node, "linux,elfcorehdr", &len); - if (!reg || (len < (dt_root_addr_cells + dt_root_size_cells))) - return 1; - - elfcorehdr_addr = dt_mem_next_cell(dt_root_addr_cells, ®); - elfcorehdr_size = dt_mem_next_cell(dt_root_size_cells, ®); - - return 1; -} - -/* - * reserve_elfcorehdr() - reserves memory for elf core header - * - * This function reserves the memory occupied by an elf core header - * described in the device tree. This region contains all the - * information about primary kernel's core image and is used by a dump - * capture kernel to access the system memory on primary kernel. - */ -static void __init reserve_elfcorehdr(void) -{ - of_scan_flat_dt(early_init_dt_scan_elfcorehdr, NULL); - - if (!elfcorehdr_size) - return; - - if (memblock_is_region_reserved(elfcorehdr_addr, elfcorehdr_size)) { - pr_warn("elfcorehdr is overlapped\n"); - return; - } - - memblock_reserve(elfcorehdr_addr, elfcorehdr_size); - - pr_info("Reserving %lldKB of memory at 0x%llx for elfcorehdr\n", - elfcorehdr_size >> 10, elfcorehdr_addr); -} -#else -static void __init reserve_elfcorehdr(void) -{ -} -#endif /* CONFIG_CRASH_DUMP */ - /* * Return the maximum physical address for a zone accessible by the given bits * limit. If DRAM starts above 32-bit, expand the zone to the maximum @@ -395,8 +344,6 @@ void __init arm64_memblock_init(void) early_init_fdt_scan_reserved_mem(); - reserve_elfcorehdr(); - high_memory = __va(memblock_end_of_DRAM() - 1) + 1; } -- 2.25.1