Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp28850lfe; Fri, 15 Apr 2022 17:54:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx65GkOVxi8TsS/3DiRHI5B+L2ouwsu3ULbmfA0/dKKy+vEeh+kiXkzHr9V9DQq+4x7KEoH X-Received: by 2002:a17:902:e543:b0:158:6190:ec5d with SMTP id n3-20020a170902e54300b001586190ec5dmr1302083plf.43.1650070479049; Fri, 15 Apr 2022 17:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650070479; cv=none; d=google.com; s=arc-20160816; b=jyInGaMLR1QPh0YG9fcUBSpVmBT3dhLiS3+6HtJTG8qmEaCh4F91DY1wS4czQotSsM BfVHD8jZ448H3/+qGc4SnsWLHCZg5zmmLFvaCN2kht0U2pmZ9wEzhKHlhJ8X4cThhp1u GelpHZe15T7NDcOq9hFO2iizkbqKgkAbFLKXr8QcypPv7ZL+2mTBYvy5wAFix0sFSCcS LWulIasbGP7jmaKolUBwqZL4uGGBTNZjxPAgFE0LGywBTuQoSPMpvdqHj5O8snVIiOlT qi86zLJs8838SUICeCKsQnMIEIKHU5VsDFUFR48ji5LNq/LtqrP77+tRcCKsDi6E+UUI 4Irw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=PtDDDMcpbjTX0lkTAIdxwFiInqqCQLCcTnQJGDz6rMc=; b=auQREeCOBzWiJJRxtWt2UVi0/HVRyHbotl4JwAGElAdIgtwJTbIL5PkSrT++mu876t eaPA9B6a2bebf49x3CKBvQDL5/6YPOY4ggcURn2gKcg5oYHyqMBSBwb/fKYWEbONVYhb Wr0T5soj5OhJvM0GJQzHl+ol7nMfhEmxY5MT5nh4imGJlfW9FmkWefeLm+1MtiBwJWqw k061fzeMCQA4CQTGSDwuKmYcy+DDqHNkDHshUNLPA+RttqeOonY7HhW3FA6aAFD+9o79 mDz3MaimXzxTWn5CrMCEIecHBPaHEYq0u04Xxe7skS+wyHZFNo6swWtxJZjgeojNCGLk CKRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f18-20020a170902ce9200b0015164c6214bsi2606760plg.2.2022.04.15.17.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4274F10DA6C; Fri, 15 Apr 2022 17:41:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242119AbiDNJ5T (ORCPT + 99 others); Thu, 14 Apr 2022 05:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241941AbiDNJ5D (ORCPT ); Thu, 14 Apr 2022 05:57:03 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D459911C24; Thu, 14 Apr 2022 02:54:35 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KfFCm21FzzfYmf; Thu, 14 Apr 2022 17:53:56 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 17:54:33 +0800 Received: from localhost.localdomain (10.175.112.125) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 17:54:32 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 4/9] arm64/mirror: arm64 enabling - find mirrored memory ranges Date: Thu, 14 Apr 2022 18:13:09 +0800 Message-ID: <20220414101314.1250667-5-mawupeng1@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20220414101314.1250667-1-mawupeng1@huawei.com> References: <20220414101314.1250667-1-mawupeng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ma Wupeng Commit b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory ranges") introduced mirrored memory support for x86 and this could be used on arm64. So efi_find_mirror() is added in efi_init() so on EFI enabled systems scan the memory map and tell memblock about any mirrored ranges. Signed-off-by: Ma Wupeng --- Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/arm64/kernel/setup.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index ea47c0ba7593..1d87dc4e3cef 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -2270,7 +2270,7 @@ keepinitrd [HW,ARM] - kernelcore= [KNL,X86,IA-64,PPC] + kernelcore= [KNL,X86,IA-64,PPC,ARM64] Format: nn[KMGTPE] | nn% | "mirror" This parameter specifies the amount of memory usable by the kernel for non-movable allocations. The requested diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index daade64889ff..3957290d9ade 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -345,6 +345,7 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) arm64_memblock_init(); efi_fake_memmap(); + efi_find_mirror(); paging_init(); -- 2.18.0.huawei.25