mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dobson <colpatch@us.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: LSE Tech <lse-tech@lists.sourceforge.net>, Andrew Morton <akpm@osdl.org>
Subject: [RFC PATCH 8/10] Replace 'numnodes' with 'node_online_map' - ppc64
Date: Thu, 23 Dec 2004 14:45:15 -0800	[thread overview]
Message-ID: <1103841915.3945.34.camel@arrakis> (raw)
In-Reply-To: <1103838712.3945.12.camel@arrakis>

8/10 - Replace numnodes with node_online_map for ppc64

[mcd@arrakis node_online_map]$ diffstat arch-ppc64.patch
 init.c |    2 +-
 numa.c |   14 ++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)


-Matt

diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/ppc64/mm/init.c linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/init.c
--- linux-2.6.10-rc3-mm1/arch/ppc64/mm/init.c	2004-12-13 16:22:53.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/init.c	2004-12-14 11:57:17.000000000 -0800
@@ -703,7 +703,7 @@ void __init mem_init(void)
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
 
 #ifdef CONFIG_DISCONTIGMEM
-        for (nid = 0; nid < numnodes; nid++) {
+        for_each_online_node(nid) {
 		if (NODE_DATA(nid)->node_spanned_pages != 0) {
 			printk("freeing bootmem node %x\n", nid);
 			totalram_pages +=
diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/ppc64/mm/numa.c linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/numa.c
--- linux-2.6.10-rc3-mm1/arch/ppc64/mm/numa.c	2004-12-13 16:22:53.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.ppc64/arch/ppc64/mm/numa.c	2004-12-15 13:29:14.000000000 -0800
@@ -216,7 +216,7 @@ static int numa_setup_cpu(unsigned long 
 
 	numa_domain = of_node_numa_domain(cpu);
 
-	if (numa_domain >= numnodes) {
+	if (numa_domain >= num_online_nodes()) {
 		/*
 		 * POWER4 LPAR uses 0xffff as invalid node,
 		 * dont warn in this case.
@@ -384,7 +384,8 @@ new_range:
 			goto new_range;
 	}
 
-	numnodes = max_domain + 1;
+	for (i = 0; i <= max_domain; i++)
+		node_set_online(i);
 
 	return 0;
 }
@@ -430,12 +431,9 @@ static void __init dump_numa_topology(vo
 	if (min_common_depth == -1 || !numa_enabled)
 		return;
 
-	for (node = 0; node < MAX_NUMNODES; node++) {
+	for_each_online_node(node) {
 		unsigned long i;
 
-		if (!node_online(node))
-			continue;
-
 		printk(KERN_INFO "Node %d Memory:", node);
 
 		count = 0;
@@ -519,7 +517,7 @@ void __init do_init_bootmem(void)
 
 	register_cpu_notifier(&ppc64_numa_nb);
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_paddr, end_paddr;
 		int i;
 		unsigned long bootmem_paddr;
@@ -619,7 +617,7 @@ void __init paging_init(void)
 	memset(zones_size, 0, sizeof(zones_size));
 	memset(zholes_size, 0, sizeof(zholes_size));
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_pfn;
 		unsigned long end_pfn;
 



  parent reply	other threads:[~2004-12-23 22:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-23 21:51 [RFC PATCH 0/10] Replace 'numnodes' with 'node_online_map' Matthew Dobson
2004-12-23 22:35 ` [RFC PATCH 1/10] Replace 'numnodes' with 'node_online_map' - alpha Matthew Dobson
2004-12-23 22:37 ` [RFC PATCH 2/10] Replace 'numnodes' with 'node_online_map' - arm Matthew Dobson
2004-12-23 22:39 ` [RFC PATCH 3/10] Replace 'numnodes' with 'node_online_map' - i386 Matthew Dobson
2004-12-23 22:40 ` [RFC PATCH 4/10] Replace 'numnodes' with 'node_online_map' - ia64 Matthew Dobson
2004-12-23 22:41 ` [RFC PATCH 5/10] Replace 'numnodes' with 'node_online_map' - m32r Matthew Dobson
2004-12-23 22:42 ` [RFC PATCH 6/10] Replace 'numnodes' with 'node_online_map' - mips Matthew Dobson
2004-12-23 22:44 ` [RFC PATCH 7/10] Replace 'numnodes' with 'node_online_map' - parisc Matthew Dobson
2004-12-23 22:45 ` Matthew Dobson [this message]
2004-12-23 22:46 ` [RFC PATCH 9/10] Replace 'numnodes' with 'node_online_map' - x86_64 Matthew Dobson
2004-12-23 22:47 ` [RFC PATCH 10/10] Replace 'numnodes' with 'node_online_map' - arch-independent Matthew Dobson

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=1103841915.3945.34.camel@arrakis \
    --to=colpatch@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome