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 1/10] Replace 'numnodes' with 'node_online_map' - alpha
Date: Thu, 23 Dec 2004 14:35:05 -0800	[thread overview]
Message-ID: <1103841305.3945.15.camel@arrakis> (raw)
In-Reply-To: <1103838712.3945.12.camel@arrakis>

1/10 - Replace numnodes with node_online_map for alpha

[mcd@arrakis node_online_map]$ diffstat arch-alpha.patch
 numa.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

-Matt

diff -Nurp --exclude-from=/home/mcd/.dontdiff linux-2.6.10-rc3-mm1/arch/alpha/mm/numa.c linux-2.6.10-rc3-mm1-nom.alpha/arch/alpha/mm/numa.c
--- linux-2.6.10-rc3-mm1/arch/alpha/mm/numa.c	2004-12-13 16:22:45.000000000 -0800
+++ linux-2.6.10-rc3-mm1-nom.alpha/arch/alpha/mm/numa.c	2004-12-14 11:57:16.000000000 -0800
@@ -246,7 +246,7 @@ setup_memory_node(int nid, void *kernel_
 	reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size);
 	printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size));
 
-	numnodes++;
+	node_set_online(nid);
 }
 
 void __init
@@ -256,7 +256,7 @@ setup_memory(void *kernel_end)
 
 	show_mem_layout();
 
-	numnodes = 0;
+	nodes_clear(node_online_map);
 
 	min_low_pfn = ~0UL;
 	max_low_pfn = 0UL;
@@ -303,7 +303,7 @@ void __init paging_init(void)
 	 */
 	dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
 		unsigned long end_pfn = node_bdata[nid].node_low_pfn;
 
@@ -332,7 +332,7 @@ void __init mem_init(void)
 	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
 	reservedpages = 0;
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		/*
 		 * This will free up the bootmem, ie, slot 0 memory
 		 */
@@ -372,7 +372,7 @@ show_mem(void)
 	printk("\nMem-info:\n");
 	show_free_areas();
 	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		struct page * lmem_map = node_mem_map(nid);
 		i = node_spanned_pages(nid);
 		while (i-- > 0) {



  reply	other threads:[~2004-12-23 22:35 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 ` Matthew Dobson [this message]
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 ` [RFC PATCH 8/10] Replace 'numnodes' with 'node_online_map' - ppc64 Matthew Dobson
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=1103841305.3945.15.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