From patchwork Tue Dec 14 04:01:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 12696027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22EAAC433F5 for ; Tue, 14 Dec 2021 04:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RzDGBbiAx9wXDWxrIECUAkLfzeZOIw9lApgU431RzTM=; b=ZXfJUVXa5wEJ9a xRU1Dn/k4vAGcAje0jlTifgG64kxjBpoSwgGqStIvh9s9GF8KQw1hAcuRn/p0vUHbjSeUHwOlKgJD 0MCoVKMmSEN45ncoUr1anrg5Q6ChPho83YAziGNusEc+61wIxc9gXwh5uQUdEtum4OUWO4JKf4fQN 9t/sdUWTc8nuFcG4SJ1PGzEKvOiFSp06Hu3qtlhN+AQHa5dSSzgJLhkcMEO+XnNx7PKIhuc60PUPA 8Vx1vsHNVJ1rJ1OEnkUn93o/o23peujL7pwmTSgZMSSv/rRpWdEUr35VJP3GWMux4r32s/D4aI/cO OzXobc6LkWu4jRQLrvhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwz1E-00CUid-D0; Tue, 14 Dec 2021 04:02:26 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwz17-00CUgu-VM for linux-arm-kernel@lists.infradead.org; Tue, 14 Dec 2021 04:02:19 +0000 Received: by mail-pf1-x42a.google.com with SMTP id 8so16763014pfo.4 for ; Mon, 13 Dec 2021 20:02:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zISpoeMYICSaiB4z3xpc+ADTtV+w5l/Wcvj8K92an1Q=; b=fOqWBwX4Ya5XyCZzaaBzTzljxNwku+K+9af64cJDBtK0Ia414R1J4yxCvKUBvwT5Iz PMxg4Y1527qeFaFdhl2g8jaJXrSmwSqQ2w/RQLyEWEHxvpTtAIlsEcitIFywIXLPZH2G mXg20SK7hXXmIoNX41g/o2Pyppp0vdVTnxTXbdBRE2JxWGG2tNTOh64aZugLbKM7NPKM KUUi60cIrX6RKy1H0mansL6x1kVQ6ymtkm7zeT0IaB1eXuEtsJuKoEHHNqC26+Y1t5y/ /mWh2OS1cIX4CRBSFSLefpK96fJjQp4bD5MUIUGonOcjnq8bvQcjMQdpUac45mrNYLRq 3Wsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zISpoeMYICSaiB4z3xpc+ADTtV+w5l/Wcvj8K92an1Q=; b=ClaD/z0PNGuNRkE6SF1lApb9/4I/Dc7FohjjeAgRlU/ISbRRA9s7fF6KIZs+oPJ+OI sKQSPe2uPlAhQXKbm0vKlxoJW5hqZUjhsSCzWtUIdOhHa50A5hwX5ANjUUzJwOaTXqqt 9hkcnELf6QQXK/iQ/EeB3siG6OaX72oZgmD+jIBeV18EmbWwlhUINYe/NTcoIcleMc7N +WKyLdENh68jR/aBKwAd3o1vf88FQWS5ttaC4FydkE42hRgAZj7TSfZd7hDf5s2UUkIb NJwolzBuocfukUl1wufDHExIpTAiOzt57BM+bM+ymxpd4eM5g+VrZ1U2iecRlBXN9yAP mijQ== X-Gm-Message-State: AOAM533X6AQwvf8qfohwZ6KQO322aaZ1GdEFrOdIUUaD8zf3BSHohvV5 WOQe9L+T0bxNe5Ir26D4lA== X-Google-Smtp-Source: ABdhPJwLheIuYYNyneG8TfzZgX+skEctf9nWg/fJIOTO1QqJZwxV7AATQAqAvTBRL8LGIOZX7Qrj0Q== X-Received: by 2002:a63:fa17:: with SMTP id y23mr2098027pgh.400.1639454536648; Mon, 13 Dec 2021 20:02:16 -0800 (PST) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id v63sm11538777pgv.71.2021.12.13.20.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 20:02:16 -0800 (PST) From: Pingfan Liu To: devicetree@vger.kernel.org, linux-efi@vger.kernel.org Cc: Pingfan Liu , Rob Herring , Zhen Lei , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , Geert Uytterhoeven , Frank Rowand , Ard Biesheuvel , Nick Terrell , linux-arm-kernel@lists.infradead.org Subject: [PATCHv2 0/2] arm64: fdt: fix membock add/cap ordering Date: Tue, 14 Dec 2021 12:01:55 +0800 Message-Id: <20211214040157.27443-1-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_200218_048207_271B4689 X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In fact, V2 tackles this issue at efi_init() for both arm64 and risc-v. Since in Zhen Lei's series "[PATCH v17 00/10] support reserving crashkernel above 4G on arm64 kdump", [8/10] is self-standing and meaningful. I abstract and utilize it. I make a small change in it in order to use early_init_dt_check_for_usable_mem_range() outside of/fdt. (Cc: Zhen, please let me know if it is not fine for you.) So finally these two patches can be applied as candidates for Fixes: b261dba2fdb2 ("arm64: kdump: Remove custom linux,usable-memory-range handling") [1]: https://lore.kernel.org/all/20211210065533.2023-9-thunder.leizhen@huawei.com/ v1 -> v2: Adopt Rob's suggestion to call early_init_dt_check_for_usable_mem_range() from efi_init() Cc: Rob Herring Cc: Zhen Lei Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Cc: Mike Rapoport Cc: Geert Uytterhoeven Cc: Frank Rowand Cc: Ard Biesheuvel Cc: Nick Terrell Cc: linux-arm-kernel@lists.infradead.org To: devicetree@vger.kernel.org To: linux-efi@vger.kernel.org Pingfan Liu (1): efi: apply memblock cap after memblock_add() Zhen Lei (1): of: fdt: Aggregate the processing of "linux,usable-memory-range" drivers/firmware/efi/efi-init.c | 7 +++++++ drivers/of/fdt.c | 18 +++++++++++++----- include/linux/of_fdt.h | 1 + 3 files changed, 21 insertions(+), 5 deletions(-)