linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: apw@shadowen.org, lhms-devel@lists.sourceforge.net, linux-mm@kvack.org
Subject: 050 bootmem use NODE_DATA
Date: Mon, 18 Oct 2004 15:32:29 +0100	[thread overview]
Message-ID: <E1CJYYn-0000Zk-4w@ladymac.shadowen.org> (raw)
In-Reply-To: <4173D219.3010706@shadowen.org>

Convert the default non-node based bootmem routines to use
NODE_DATA(0).  This is semantically and functionally identical in
any non-node configuration as NODE_DATA(x) is defined as below.

#define NODE_DATA(nid)          (&contig_page_data)

For the node cases (CONFIG_NUMA and CONFIG_DISCONTIG_MEM) we can
use these non-node forms where all boot memory is defined on node 0.

Revision: $Rev$

Signed-off-by: Andy Whitcroft <apw@shadowen.org>

diffstat 050-bootmem-use-NODE_DATA
---
 bootmem.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff -upN reference/mm/bootmem.c current/mm/bootmem.c
--- reference/mm/bootmem.c
+++ current/mm/bootmem.c
@@ -343,31 +343,29 @@ unsigned long __init free_all_bootmem_no
 	return(free_all_bootmem_core(pgdat));
 }
 
-#ifndef CONFIG_DISCONTIGMEM
 unsigned long __init init_bootmem (unsigned long start, unsigned long pages)
 {
 	max_low_pfn = pages;
 	min_low_pfn = start;
-	return(init_bootmem_core(&contig_page_data, start, 0, pages));
+	return(init_bootmem_core(NODE_DATA(0), start, 0, pages));
 }
 
 #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
 void __init reserve_bootmem (unsigned long addr, unsigned long size)
 {
-	reserve_bootmem_core(contig_page_data.bdata, addr, size);
+	reserve_bootmem_core(NODE_DATA(0)->bdata, addr, size);
 }
 #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
 
 void __init free_bootmem (unsigned long addr, unsigned long size)
 {
-	free_bootmem_core(contig_page_data.bdata, addr, size);
+	free_bootmem_core(NODE_DATA(0)->bdata, addr, size);
 }
 
 unsigned long __init free_all_bootmem (void)
 {
-	return(free_all_bootmem_core(&contig_page_data));
+	return(free_all_bootmem_core(NODE_DATA(0)));
 }
-#endif /* !CONFIG_DISCONTIGMEM */
 
 void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal)
 {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-10-18 14:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18 14:24 CONFIG_NONLINEAR for small systems Andy Whitcroft
2004-10-18 14:32 ` Andy Whitcroft [this message]
2004-10-26 18:16   ` 050 bootmem use NODE_DATA Dave Hansen
2004-10-18 14:33 ` 060 refactor setup_memory i386 Andy Whitcroft
2004-10-18 14:34 ` 080 alloc_remap i386 Andy Whitcroft
2004-10-18 14:35 ` 100 cleanup node zone Andy Whitcroft
2004-10-18 14:35 ` 150 nonlinear Andy Whitcroft
2004-10-26 18:36   ` Dave Hansen
2004-10-26 19:07     ` [Lhms-devel] " Mika Penttilä
2004-10-26 19:42       ` Dave Hansen
2004-10-26 20:41         ` Mika Penttilä
2004-10-26 20:55           ` Dave Hansen
2004-10-26 21:20             ` Mika Penttilä
2004-10-26 21:27               ` Dave Hansen
2004-10-26 21:38                 ` Mika Penttilä
2004-10-26 21:41                   ` Dave Hansen
2004-10-26 21:55                     ` Mika Penttilä
2004-10-26 21:53                       ` Dave Hansen
2004-10-26 22:01                         ` Mika Penttilä
2004-10-28 11:07     ` Andy Whitcroft
2004-10-18 14:36 ` 160 nonlinear i386 Andy Whitcroft
2004-10-18 14:36 ` 170 nonlinear ppc64 Andy Whitcroft
2004-10-18 15:17 ` [Lhms-devel] CONFIG_NONLINEAR for small systems Hirokazu Takahashi
2004-10-18 15:29   ` Andy Whitcroft
2004-10-19  4:30 ` Hiroyuki KAMEZAWA
2004-10-19  8:16   ` Andy Whitcroft

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=E1CJYYn-0000Zk-4w@ladymac.shadowen.org \
    --to=apw@shadowen.org \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-mm@kvack.org \
    /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