Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4271525pxt; Wed, 11 Aug 2021 01:56:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcMngzh+sHTPHq/ph/l6mg10hfUDy2I9qkAFB+lwx4efgZWdkYhgqoVqDb64ZF9/vLJENA X-Received: by 2002:a05:6402:445:: with SMTP id p5mr10240507edw.208.1628672218381; Wed, 11 Aug 2021 01:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628672218; cv=none; d=google.com; s=arc-20160816; b=KaXP0aIjI6vZRtacfPB2D4We5d3b4ce4o4KUEZvI74mflysL0noJCPeJUuNd6ui+Gp Fl1bWlaAJ5SXM9ZKPDKnT/zIGNLx+sjCusueV3lgzRSMpTE12IKGpT/dKKGzcWvA5Kku iQlGypGMRX4skjKnuWaIwo/bKoCMKOM6X3UuTtYkJAs4U49HAo/Q69k0J2sIfWgSD4u/ WGKJOfo6p9ztBjyCAGbl/WhPOS41MhFMbJqPywF1WoT96iCxbQGPuyUuOyTuTJaN/gtQ yzU2AcCL5ELNJ7ryv+3fwPkMiSg+jsOoi+F8be4Q2BZ6wP5k1VBntcpAkxbyCaCxkC4t 5q8Q== 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=Y3gv0hBrtzVbkJDFvKWNiJujXFdCYCk+E8RB6R0yRRw=; b=I7GiBKtN+02b28ta8EnSPDjZohu0xE8So05AcSroacjANH4M+gjuehi7frsVzvooaV SlLpg9pCRPj/un/jKbV6fy+cRSsZtq5NQVtQlczI0uBkVz0oao06bqBhl/DUKCOU8sUk uIA5NhouTtyf+B7AJOCQ36NPkG5dCBdQnKNi913V+NNfXIkHQvGHIoD7+AOqiJZhtlGx DALvVBLEyoWYsm25rca9N+ugeSNDWLEtqYk0s/Tkf8VQIgkWJnR8nlB0g1CpPQXjD/4D fRyBhbvZbGCRG0+b5L3+kEyM23CtPE2H8sGK2zPZBEUfs7rW15evRg8JvtIzX81Pa0HG G3LQ== 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 z27si4892380ejf.565.2021.08.11.01.56.34; Wed, 11 Aug 2021 01:56:58 -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 S236397AbhHKIw1 (ORCPT + 99 others); Wed, 11 Aug 2021 04:52:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236342AbhHKIwB (ORCPT ); Wed, 11 Aug 2021 04:52:01 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA8CEC0617BB 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 baptiste.telenet-ops.be with bizsmtp id g8rG2500D1gJxCh018rG4B; Wed, 11 Aug 2021 10:51:33 +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 1mDjxE-001yaG-7u; Wed, 11 Aug 2021 10:51:16 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mDjxD-0058xY-G7; 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 8/9] arm64: kdump: Remove custom linux,usable-memory-range handling Date: Wed, 11 Aug 2021 10:51:06 +0200 Message-Id: <7356c531c49a24b4a55577bf8e46d93f4d8ae460.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,usable-memory-range" property under the "/chosen" node in DT, as the platform-agnostic FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven --- v5: - Remove all handling, not just parsing, v4: - New. --- arch/arm64/mm/init.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index bac4f06bb7d900a2..4e90a1d170587376 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -197,45 +197,10 @@ static int __init early_mem(char *p) } early_param("mem", early_mem); -static int __init early_init_dt_scan_usablemem(unsigned long node, - const char *uname, int depth, void *data) -{ - struct memblock_region *usablemem = data; - const __be32 *reg; - int len; - - if (depth != 1 || strcmp(uname, "chosen") != 0) - return 0; - - reg = of_get_flat_dt_prop(node, "linux,usable-memory-range", &len); - if (!reg || (len < (dt_root_addr_cells + dt_root_size_cells))) - return 1; - - usablemem->base = dt_mem_next_cell(dt_root_addr_cells, ®); - usablemem->size = dt_mem_next_cell(dt_root_size_cells, ®); - - return 1; -} - -static void __init fdt_enforce_memory_region(void) -{ - struct memblock_region reg = { - .size = 0, - }; - - of_scan_flat_dt(early_init_dt_scan_usablemem, ®); - - if (reg.size) - memblock_cap_memory_range(reg.base, reg.size); -} - void __init arm64_memblock_init(void) { const s64 linear_region_size = PAGE_END - _PAGE_OFFSET(vabits_actual); - /* Handle linux,usable-memory-range property */ - fdt_enforce_memory_region(); - /* Remove memory above our supported physical address size */ memblock_remove(1ULL << PHYS_MASK_SHIFT, ULLONG_MAX); -- 2.25.1