Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3200026pxb; Sat, 26 Mar 2022 13:19:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMmXFAjH1r98G3BpHbWPGalM0/xNP68CB/javcNm8195nQ/l/kUbQDxJpfQbq99vaL05k0 X-Received: by 2002:a17:906:704f:b0:6e0:2ce5:131e with SMTP id r15-20020a170906704f00b006e02ce5131emr18096441ejj.246.1648325967613; Sat, 26 Mar 2022 13:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648325967; cv=none; d=google.com; s=arc-20160816; b=OhzK+i475oDxItj3h7WROeUa8r4MYcdpDa4+8yqsggGe/w4+mzPvY6z3yOeEKay43w liUX0Pz7iIHV8QbW9s2Nge8DJR+0cy30OHYHZHcEBgRsivefE6sPjxyNlcKVmQTwQkvS jAl5YHKVxHwco/uI1m9iiKl5172/HBRM273CUVJqB56JzQrp0CuysCOl2Tt6MeGXNcPC GbYMEuveJo7JSSoehP6FIZxVpe5cZb1ndEO4Onh3UPeA1GrWhpYtl/ecPcqAhyh5XjYR fxFcfclivg8WHvfyTFedOpo2Qb0/kYw2yZeP1fs+9gHCed4P2NfmAwbFn06qzkZwMfLp vrZQ== 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=gssbxSuQqX/NzMk2hM7/VXDJIJkKxISWGib9BY3unBU=; b=MDXAAaao4lDka6KCl9nUcWP5mzuRSUGB9f3oYtkYz8Lk/PNznHhd4CKT/aGx40GZUh C36K2BS2K7fqW+U3gK6p4AsxndlouEdIs+n2cULkA8gn3M4jLMrLzzdIOHOCv8Ir+CRV ILuZU0D4a3joXAQsSXT3WiwqGPHFdmnLMBWuMpj1+fEJQ5ycCRl0dimy5IbBvkJSb1vB Rzm30OFK80kYnquEhomJBE/BC9yJcrvlxsfF5NGajmWWRaGecU1jNrnOqXNCTO1YCZpi vsAF6xeNin3yMUrooXw80shZ1F0xSkOoOcam7jOamJjdmnGvSQ/FDxfCUOfLnTJzjDZ3 ue1g== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ci2-20020a170906c34200b006df76385e96si7143300ejb.822.2022.03.26.13.19.02; Sat, 26 Mar 2022 13:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbiCZG3g (ORCPT + 99 others); Sat, 26 Mar 2022 02:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbiCZG3Q (ORCPT ); Sat, 26 Mar 2022 02:29:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BB4527CFF; Fri, 25 Mar 2022 23:27:40 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KQTVg3DKnzfZK8; Sat, 26 Mar 2022 14:26:03 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Sat, 26 Mar 2022 14:27:38 +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.2308.21; Sat, 26 Mar 2022 14:27:37 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 4/9] arm64/mirror: arm64 enabling - find mirrored memory ranges Date: Sat, 26 Mar 2022 14:46:27 +0800 Message-ID: <20220326064632.131637-5-mawupeng1@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20220326064632.131637-1-mawupeng1@huawei.com> References: <20220326064632.131637-1-mawupeng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 e064839895ee..0af91e0aafea 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