Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp572777iog; Mon, 13 Jun 2022 08:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6laAOpQcg6Uo81UNHMXKCMlXrVTkoiR+9wx/ZHsEzozwjo6MA+VPtVbBeo8TmxYjyystV X-Received: by 2002:a17:906:d82:b0:70d:84d3:b6df with SMTP id m2-20020a1709060d8200b0070d84d3b6dfmr356175eji.464.1655133767158; Mon, 13 Jun 2022 08:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655133767; cv=none; d=google.com; s=arc-20160816; b=EVGZdB/cEbv1lcdJu7aOLZe1x1izdiWyAfmYEMOd8oKJufXZotIgj+W5ZJ6KyJjM/w nCaRiSah4Gk+Kr8yXuXaqpdxexGBTPno9At5myEkwmgtiapl8vHGTyXNiAzmfOshxzXp y6Hn+Lh5lepFDnrfh4+9/3117tNS25fanPv5JKHACdG7v1nkqWXM0yz0J22hcuFTGXl6 PzZU24FumPIorC1oDBycf2S6OpmJ9IuiUUf/DAEvPw69SkZg6hgQ+ecy41A+14vCKFoP jiYO+T1jB206iCehhZiR1Zc7I7Uz+rRi1FW8nuUZ/JmhOttm2/qvj4We5LX3W9gG2LlW Db6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=zPEhbe5jr6xljP5r16Njomy+ie2EsH16QxInbAetEbw=; b=cUULI7d0YbQnsvQS2so6lUC1y1KsHFx8JuBCqs7j0WYVCIUA6lTMvwURxEF8ZEPz1H ttHaOHEse49LEpcbpNUdaMjPbs8OGyPopcrauwVs3EgFo0GENCcZFIVend/Hk5yrtov4 HZ8wwdAThllt1XrwsF/m5UjZQNkkPc+OgSno/kOY4IwtZCj5uaCQQdp0nZxbZd4QgX8U +U4Rb46k5zZdWZlpkg8bTXKfDQ5A3qG7OhXzRfNn1mEVPbivE/fwG1+bbsJ2bQCU2u/v wc//1Wpk8nWfh1MQw3Pg9Wmw7lqIgkjHxJnjYzXl0SR+crJERXyI4/OesRExEdlcpF1X d5yg== 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 v7-20020a056402348700b004262cf3f74asi8986795edc.599.2022.06.13.08.22.21; Mon, 13 Jun 2022 08:22:47 -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 S1356101AbiFMLsQ (ORCPT + 99 others); Mon, 13 Jun 2022 07:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356763AbiFMLpB (ORCPT ); Mon, 13 Jun 2022 07:45:01 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBB3D21276; Mon, 13 Jun 2022 03:51:12 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LM7bq14W9z1K9Sb; Mon, 13 Jun 2022 18:49:11 +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.2375.24; Mon, 13 Jun 2022 18:50:47 +0800 Received: from [10.174.178.120] (10.174.178.120) 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; Mon, 13 Jun 2022 18:50:45 +0800 Message-ID: <4e312b22-73ba-8d59-b494-b7cb1d7bbb49@huawei.com> Date: Mon, 13 Jun 2022 18:50:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 From: mawupeng Subject: Re: [PATCH v4 5/6] mm: Only remove nomap flag for initrd To: , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20220613082147.183145-1-mawupeng1@huawei.com> <20220613082147.183145-6-mawupeng1@huawei.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.120] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 On 6/13/2022 5:42 PM, Ard Biesheuvel wrote: > On Mon, 13 Jun 2022 at 10:00, Wupeng Ma wrote: >> >> From: Ma Wupeng >> >> Commit 177e15f0c144 ("arm64: add the initrd region to the linear mapping explicitly") >> remove all the flags of the memory used by initrd. This is fine since >> MEMBLOCK_MIRROR is not used in arm64. >> >> However with mirrored feature introduced to arm64, this will clear the mirrored >> flag used by initrd, which will lead to error log printed by >> find_zone_movable_pfns_for_nodes() if the lower 4G range has some non-mirrored >> memory. >> >> To solve this problem, only MEMBLOCK_NOMAP flag will be removed via >> memblock_clear_nomap(). >> >> Signed-off-by: Ma Wupeng > > Reviewed-by: Ard Biesheuvel > > This needs and ack from the arm64 maintainers, please? > And also please fix the subject to include 'arm64' > Ok, I will include 'arm64' in my subject in v5. Thanks for reviewing. > >> --- >> arch/arm64/mm/init.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c >> index 339ee84e5a61..8456dbae9441 100644 >> --- a/arch/arm64/mm/init.c >> +++ b/arch/arm64/mm/init.c >> @@ -350,8 +350,8 @@ void __init arm64_memblock_init(void) >> "initrd not fully accessible via the linear mapping -- please check your bootloader ...\n")) { >> phys_initrd_size = 0; >> } else { >> - memblock_remove(base, size); /* clear MEMBLOCK_ flags */ >> memblock_add(base, size); >> + memblock_clear_nomap(base, size); >> memblock_reserve(base, size); >> } >> } >> -- >> 2.25.1 >> > .