Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1533804pxb; Thu, 14 Apr 2022 08:10:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO2FvDFc3U5435tq9XeRWa69qpN9A7fF+BeQso0vl2VDTnUgpBdt2y7Fr6eFIJ/lPBspyl X-Received: by 2002:a05:6402:274e:b0:419:81a1:ed9b with SMTP id z14-20020a056402274e00b0041981a1ed9bmr3591920edd.9.1649949043085; Thu, 14 Apr 2022 08:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649949043; cv=none; d=google.com; s=arc-20160816; b=01pKYBon7P+OhuGSwNfNd7x6O9UV2XGdfYTdFEYPTYWMJHTdWrzvu5PsLV4r0JrruL 4My6oIFa+mZbkFLyvYdXnn+JyHAH3+f5j+uzg4IssyCjVL4MeMheLuHOKzly9JXIRvvA ERnRMVNFi0cJd8vgq7AKIDIquWH4tiSAC1elJZe4tL4j093PmzhSW+Wgi+Yg9NRQYzzC LO4ZtW3nzeUq/Ysc5qBWDLzfKs0JZkq6RTfsmmPtViMYOhlQoAz2GgGzWrzhAnN7i6bW NEx6BtkAH41TSQeYmUzErNknqJXw3vADFQVKEwf3t1QLkVug/vPm+TJPvdnVU/QL072F srsQ== 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=xV4oDLgpfRCsT81dopeucS6q+yINppRfeg9Pc/f5iCA=; b=wgPrC0U3GXRz5KE/2z6hYI/GsxC03wfcH89RsfGfuag9mVF+LmF2+4NvKisHyXZY6d 96WUfCVNcoS4pZDiOOy7RYuzVVOq62A6SC7q5qtlN6aUGv4G0++p4LeEOnlQB4n98mor MLQLa8lkmAEyDYJtYyr6RA5rmhTslmjOdcGATifBDKSYKp+y2YOJ1PA98+c9GQQMB4ta 3VQlO1N534MKmuqFwDUz88wQN0jotEs/uXVfyUiSVIxBe2EmYcNLcMxSCuHdK6ILEBCB xf12LXB+C/1AeVeuOpMHKL1dlWCJlw1lVcNTGFaZcy29QZiNA/uE2wq+8lPgLt6+G25N 0okw== 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 o12-20020aa7d3cc000000b0041d76ccf69asi3626583edr.621.2022.04.14.08.09.49; Thu, 14 Apr 2022 08:10:43 -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 S242204AbiDNJ5a (ORCPT + 99 others); Thu, 14 Apr 2022 05:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242046AbiDNJ5E (ORCPT ); Thu, 14 Apr 2022 05:57:04 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AA614018; Thu, 14 Apr 2022 02:54:39 -0700 (PDT) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KfF9m0WzxzFprV; Thu, 14 Apr 2022 17:52:12 +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; Thu, 14 Apr 2022 17:54:37 +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:36 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 7/9] mm: Calc the right pfn if page size is not 4K Date: Thu, 14 Apr 2022 18:13:12 +0800 Message-ID: <20220414101314.1250667-8-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=-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 Previous 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 replace it with PHYS_PFN(SZ_4G). 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 6e5b4488a0c5..570d0ebf98df 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7870,7 +7870,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 < PHYS_PFN(SZ_4G)) { mem_below_4gb_not_mirrored = true; continue; } -- 2.18.0.huawei.25