linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] bdata and pgdat initialization cleanup [4/5]  mod generic callers of alloc_bootmem_node
@ 2006-02-21 12:06 KAMEZAWA Hiroyuki
  0 siblings, 0 replies; only message in thread
From: KAMEZAWA Hiroyuki @ 2006-02-21 12:06 UTC (permalink / raw)
  To: linux-mm

Modifies argments of alloc_bootmem_node().

Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


Index: testtree/mm/page_alloc.c
===================================================================
--- testtree.orig/mm/page_alloc.c
+++ testtree/mm/page_alloc.c
@@ -2074,8 +2074,6 @@ static __meminit
  void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
  {
  	int i;
-	struct pglist_data *pgdat = zone->zone_pgdat;
-
  	/*
  	 * The per-page waitqueue mechanism uses hashed waitqueues
  	 * per zone.
@@ -2083,8 +2081,8 @@ void zone_wait_table_init(struct zone *z
  	zone->wait_table_size = wait_table_size(zone_size_pages);
  	zone->wait_table_bits =	wait_table_bits(zone->wait_table_size);
  	zone->wait_table = (wait_queue_head_t *)
-		alloc_bootmem_node(pgdat, zone->wait_table_size
-					* sizeof(wait_queue_head_t));
+		alloc_bootmem_node(BOOTMEM(pgdat->node_id),
+			   zone->wait_table_size * sizeof(wait_queue_head_t));

  	for(i = 0; i < zone->wait_table_size; ++i)
  		init_waitqueue_head(zone->wait_table + i);
@@ -2197,7 +2195,7 @@ static void __init alloc_node_mem_map(st
  		size = (pgdat->node_spanned_pages + 1) * sizeof(struct page);
  		map = alloc_remap(pgdat->node_id, size);
  		if (!map)
-			map = alloc_bootmem_node(pgdat, size);
+			map = alloc_bootmem_node(BOOTMEM(pgdat->node_id), size);
  		pgdat->node_mem_map = map;
  	}
  #ifdef CONFIG_FLATMEM
Index: testtree/mm/sparse.c
===================================================================
--- testtree.orig/mm/sparse.c
+++ testtree/mm/sparse.c
@@ -32,7 +32,7 @@ static struct mem_section *sparse_index_
  	unsigned long array_size = SECTIONS_PER_ROOT *
  				   sizeof(struct mem_section);

-	section = alloc_bootmem_node(NODE_DATA(nid), array_size);
+	section = alloc_bootmem_node(BOOTMEM(nid), array_size);

  	if (section)
  		memset(section, 0, array_size);
@@ -179,7 +179,7 @@ static struct page *sparse_early_mem_map
  	if (map)
  		return map;

-	map = alloc_bootmem_node(NODE_DATA(nid),
+	map = alloc_bootmem_node(BOOTMEM(nid),
  			sizeof(struct page) * PAGES_PER_SECTION);
  	if (map)
  		return map;

--
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:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-21 12:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21 12:06 [RFC][PATCH] bdata and pgdat initialization cleanup [4/5] mod generic callers of alloc_bootmem_node KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox