Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3198588pxb; Sat, 26 Mar 2022 13:17:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJBrAKhdeNBr4RWDthWteB99wQlruYVJEFLPSPQ5On8fHc1a6uyTqml6janY+gZtGRF3dc X-Received: by 2002:a17:907:c018:b0:6df:fb9b:e6f8 with SMTP id ss24-20020a170907c01800b006dffb9be6f8mr18533780ejc.495.1648325827543; Sat, 26 Mar 2022 13:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648325827; cv=none; d=google.com; s=arc-20160816; b=dow4PkzV4oDCIVGk01oXSTwnUv8CwG/BfIYY2JDi2Hag0OQZ+FVoWfw8ygoeu4JWGe bWlngaXpIM7OHRF05Fm+EOAND+B7T75tuiVPuESRCnjHFsgxceB2y2Ze2w8czMGPUsXK w1KFbPBCCSaZsRFtdHqj/EFVequ47SOXPe16QgNQ5Lq1OV5BPV2fiKxoosekr7k0iSOc WOWtD09M2LNUP9CI2cNVmO7gWw8Gxtho3Lj/+8a5QTctxM6PC/NU7Axt3kdy6Y64Bz/N cFjp/4fBQBaS+7uL+1I6+aVZFXzoGlQnCyd0Ru+xYgwEcnoXAM0/BbXxtt/DIRQLK92J oeag== 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=R+F4X0N9LN8cZNKYlBg9SNmN+eJ7XBiph30x7r96u4E=; b=c8o9m0qncnZzuxjNKJT4Dt3SVBCjFpYDa1zbinRXgQllr8jHTA4ofVlNYEaMdPUkUV 1TajcXfKTxDWYpbVe1VnVhlUw1XIY6Bk/NZfHQZ/IVgQg8qmYlfoSz3oTisH638qIx6d 4nWkIEYSziEFJERYfth8uFOwYu/mBg+CLiCt9CtLybCRk2FoFN0h98YYbo+gEcC6L2cO lOPv+THFv56dxu1JhbeJgXMpe4o9wIJSuuhp6FcXYIthorDwzxQwQg5G6M2hXmNz0bMp YlvV+hdOprfw2/OX6+e9MBlYJsDPbC63Z+pQm0CKO3yGnZHz8hhCthj9VJJdMeC+scJc yt7g== 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 q2-20020a17090609a200b006e0484f938bsi7050074eje.643.2022.03.26.13.16.42; Sat, 26 Mar 2022 13:17:07 -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 S231675AbiCZGaA (ORCPT + 99 others); Sat, 26 Mar 2022 02:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231504AbiCZG3U (ORCPT ); Sat, 26 Mar 2022 02:29:20 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D392E68F; Fri, 25 Mar 2022 23:27:44 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KQTXM0QM2z1GD24; Sat, 26 Mar 2022 14:27:31 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500020.china.huawei.com (7.185.36.49) 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:43 +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:41 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 7/9] mm: Calc the right pfn if page size is not 4K Date: Sat, 26 Mar 2022 14:46:30 +0800 Message-ID: <20220326064632.131637-8-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 Pervious 0x100000 is used to check the 4G limit in find_zone_movable_pfns_for_nodes(). This is right in x86 because the page size can only be 4K. But 16K and 64K are available in arm64. So replate it with SIZE_4G >> PAGE_SHIFT. Signed-off-by: Ma Wupeng --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6e0b4596cde9..41fd987b5b93 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7811,7 +7811,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) usable_startpfn = memblock_region_memory_base_pfn(r); - if (usable_startpfn < 0x100000) { + if (usable_startpfn < (SZ_4G >> PAGE_SHIFT)) { mem_below_4gb_not_mirrored = true; continue; } -- 2.18.0.huawei.25