From patchwork Thu Jun 23 12:29:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 12892319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E251C43334 for ; Thu, 23 Jun 2022 12:29:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D5B828E014D; Thu, 23 Jun 2022 08:29:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D09988E0144; Thu, 23 Jun 2022 08:29:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD1C28E014D; Thu, 23 Jun 2022 08:29:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A87CE8E0144 for ; Thu, 23 Jun 2022 08:29:46 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6DF28207DC for ; Thu, 23 Jun 2022 12:29:46 +0000 (UTC) X-FDA: 79609431972.29.E3E8794 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf16.hostedemail.com (Postfix) with ESMTP id EA73A180033 for ; Thu, 23 Jun 2022 12:29:45 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25NAQYEA027943; Thu, 23 Jun 2022 12:29:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Qj3YNZEYqlTD/obmc7ResKquiY/z5yJ+P0dEzb2i7Cg=; b=q1gl5buXMVaxxsHqdY3Ym9rlpLP6rgMoOeYXApIXYZ9IODId3HlkoHZCgct6ADyfo014 lOvH6zGHcn3JX48ajmlV1PsAfBiMSnunIc8FDtJgJxbvIxJys88zvUpzb7a5bdW2R1Kc rPy9qX8aGZiMv0KF2HgrUEQ8tCsi2PgN0DQtkBpHJu9FtG0riUjCc7spKQIt9dJZkY0+ ve0NTK++q8k5/PK/3Q35IKvwD5WzzkYdc1p6UwVSNs9/7PdBt9VVJUAI64QTHdRdaCGD O0SWbTpzeBgBLrjlvznsl3ywAuPHwoHogf0WdANg5UrLR0K+Uyvdv1ZiBZXwYQ/IbES9 0Q== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gvmfhpqxp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jun 2022 12:29:42 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25NCKT23028658; Thu, 23 Jun 2022 12:29:41 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma01dal.us.ibm.com with ESMTP id 3guk92mjub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jun 2022 12:29:41 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25NCTelF39911920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Jun 2022 12:29:40 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E3AD2805E; Thu, 23 Jun 2022 12:29:40 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B57728059; Thu, 23 Jun 2022 12:29:38 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.18.68]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 Jun 2022 12:29:38 +0000 (GMT) From: "Aneesh Kumar K.V" To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au Cc: linux-mm@kvack.org, Michal Hocko , "Aneesh Kumar K.V" Subject: [PATCH 2/3] powerpc/mm: Update max/min_low_pfn in the same function Date: Thu, 23 Jun 2022 17:59:21 +0530 Message-Id: <20220623122922.640980-2-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623122922.640980-1-aneesh.kumar@linux.ibm.com> References: <20220623122922.640980-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: W38rCs6DVUqOFs3BtnxNiVpGY2-S6j3Z X-Proofpoint-ORIG-GUID: W38rCs6DVUqOFs3BtnxNiVpGY2-S6j3Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-23_05,2022-06-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 priorityscore=1501 spamscore=0 mlxlogscore=935 suspectscore=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206230049 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655987386; a=rsa-sha256; cv=none; b=PSD3jRLR9sjNIWx+RtHT8PdREo40GMq7Kw1JWsWkrI6D1k1xnJi9aLjZwPFHq+SQlUHxCR h19Vr3dkTLu3nQHmPCZzuTkKs/dE3pnO6em0EzEgvF5MN1ynUdF10CUuxiTuhXSsV6yyBy PhfhCColIWB76o5cszur/ETlsj2qLAo= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=q1gl5buX; spf=pass (imf16.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655987386; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Qj3YNZEYqlTD/obmc7ResKquiY/z5yJ+P0dEzb2i7Cg=; b=3FI/hsS6lQNsNBI57D/8tp+xLXKxUZpRUXG8UsoP0T/htVNBh+FVIBoqoDjbJwmoZmYGw0 9TeUaEcIgmH+9RK5XIM7ZoQqyQAgz08UgFEoHCoS/QJ7ewjbDQ61docEv1rQj/9DNflAcd DPH3D0UWS4to41Xchy+j1Rooh4QAWg4= X-Rspamd-Queue-Id: EA73A180033 X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=q1gl5buX; spf=pass (imf16.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com X-Rspamd-Server: rspam08 X-Stat-Signature: yuadm1szs6e848pn36g7bwu3h8uumw38 X-HE-Tag: 1655987385-348561 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: For both CONFIG_NUMA enabled/disabled use mem_topology_setup to update max/min_low_pfn. This also add min_low_pfn update to CONFIG_NUMA which was initialized to zero before. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0801b2ce9b7d..b44ce71917d7 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1160,6 +1160,9 @@ void __init mem_topology_setup(void) { int cpu; + max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; + min_low_pfn = MEMORY_START >> PAGE_SHIFT; + /* * Linux/mm assumes node 0 to be online at boot. However this is not * true on PowerPC, where node 0 is similar to any other node, it @@ -1204,9 +1207,6 @@ void __init initmem_init(void) { int nid; - max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; - max_pfn = max_low_pfn; - memblock_dump_all(); for_each_online_node(nid) {