From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: linux-mm <linux-mm@kvack.org>
Subject: [RFC][PATCH] bdata and pgdat initialization cleanup [4/5] mod generic callers of alloc_bootmem_node
Date: Tue, 21 Feb 2006 21:06:47 +0900 [thread overview]
Message-ID: <43FB0257.4080802@jp.fujitsu.com> (raw)
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>
reply other threads:[~2006-02-21 12:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=43FB0257.4080802@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--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 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.