All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: linux-mm@kvack.org, Michal Hocko <mhocko@suse.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: [PATCH 2/3] powerpc/mm: Update max/min_low_pfn in the same function
Date: Thu, 23 Jun 2022 17:59:21 +0530	[thread overview]
Message-ID: <20220623122922.640980-2-aneesh.kumar@linux.ibm.com> (raw)
In-Reply-To: <20220623122922.640980-1-aneesh.kumar@linux.ibm.com>

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 <aneesh.kumar@linux.ibm.com>
---
 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) {
-- 
2.36.1


  reply	other threads:[~2022-06-23 12:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 12:29 [PATCH 1/3] powerpc/memhotplug: Add add_pages override for PPC Aneesh Kumar K.V
2022-06-23 12:29 ` Aneesh Kumar K.V
2022-06-23 12:29 ` Aneesh Kumar K.V [this message]
2022-06-23 12:29 ` [PATCH 3/3] powerpc/mm: Use VMALLOC_START to validate addr Aneesh Kumar K.V
2022-06-23 12:29   ` Aneesh Kumar K.V
2022-06-24  2:45   ` Michael Ellerman
2022-06-24  2:45     ` Michael Ellerman
2022-06-27  4:44     ` Aneesh Kumar K.V
2022-06-27  4:44       ` Aneesh Kumar K.V
2022-06-24 11:51   ` Christophe Leroy
2022-06-24 11:51     ` Christophe Leroy
2022-06-27  4:49     ` Aneesh Kumar K.V
2022-06-27  4:49       ` Aneesh Kumar K.V
2022-06-27  5:42   ` Christophe Leroy
2022-06-27  5:42     ` Christophe Leroy
2022-06-27  6:49     ` Aneesh Kumar K.V
2022-06-27  6:49       ` Aneesh Kumar K.V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220623122922.640980-2-aneesh.kumar@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhocko@suse.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.