diff options
author | Johannes Weiner <hannes@saeurebad.de> | 2008-07-24 00:26:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:14 -0400 |
commit | b61bfa3c462671c48a51fb5c31af337c5a996a04 (patch) | |
tree | 020363fd43a85ddde9998759150b428ee794dae6 /arch/ia64 | |
parent | 8b05c7e6e159d2f33c9275281b8b909a89eb7c5d (diff) |
mm: move bootmem descriptors definition to a single place
There are a lot of places that define either a single bootmem descriptor or an
array of them. Use only one central array with MAX_NUMNODES items instead.
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/mm/discontig.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 544dc420c65e..2fcf8464331e 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -36,7 +36,6 @@ struct early_node_data { | |||
36 | struct ia64_node_data *node_data; | 36 | struct ia64_node_data *node_data; |
37 | unsigned long pernode_addr; | 37 | unsigned long pernode_addr; |
38 | unsigned long pernode_size; | 38 | unsigned long pernode_size; |
39 | struct bootmem_data bootmem_data; | ||
40 | unsigned long num_physpages; | 39 | unsigned long num_physpages; |
41 | #ifdef CONFIG_ZONE_DMA | 40 | #ifdef CONFIG_ZONE_DMA |
42 | unsigned long num_dma_physpages; | 41 | unsigned long num_dma_physpages; |
@@ -76,7 +75,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len, | |||
76 | int node) | 75 | int node) |
77 | { | 76 | { |
78 | unsigned long cstart, epfn, end = start + len; | 77 | unsigned long cstart, epfn, end = start + len; |
79 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 78 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
80 | 79 | ||
81 | epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; | 80 | epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; |
82 | cstart = GRANULEROUNDDOWN(start); | 81 | cstart = GRANULEROUNDDOWN(start); |
@@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode, | |||
167 | { | 166 | { |
168 | void *cpu_data; | 167 | void *cpu_data; |
169 | int cpus = early_nr_cpus_node(node); | 168 | int cpus = early_nr_cpus_node(node); |
170 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 169 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
171 | 170 | ||
172 | mem_data[node].pernode_addr = pernode; | 171 | mem_data[node].pernode_addr = pernode; |
173 | mem_data[node].pernode_size = pernodesize; | 172 | mem_data[node].pernode_size = pernodesize; |
@@ -224,7 +223,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len, | |||
224 | { | 223 | { |
225 | unsigned long epfn; | 224 | unsigned long epfn; |
226 | unsigned long pernodesize = 0, pernode, pages, mapsize; | 225 | unsigned long pernodesize = 0, pernode, pages, mapsize; |
227 | struct bootmem_data *bdp = &mem_data[node].bootmem_data; | 226 | struct bootmem_data *bdp = &bootmem_node_data[node]; |
228 | 227 | ||
229 | epfn = (start + len) >> PAGE_SHIFT; | 228 | epfn = (start + len) >> PAGE_SHIFT; |
230 | 229 | ||
@@ -440,7 +439,7 @@ void __init find_memory(void) | |||
440 | efi_memmap_walk(find_max_min_low_pfn, NULL); | 439 | efi_memmap_walk(find_max_min_low_pfn, NULL); |
441 | 440 | ||
442 | for_each_online_node(node) | 441 | for_each_online_node(node) |
443 | if (mem_data[node].bootmem_data.node_low_pfn) { | 442 | if (bootmem_node_data[node].node_low_pfn) { |
444 | node_clear(node, memory_less_mask); | 443 | node_clear(node, memory_less_mask); |
445 | mem_data[node].min_pfn = ~0UL; | 444 | mem_data[node].min_pfn = ~0UL; |
446 | } | 445 | } |
@@ -460,7 +459,7 @@ void __init find_memory(void) | |||
460 | else if (node_isset(node, memory_less_mask)) | 459 | else if (node_isset(node, memory_less_mask)) |
461 | continue; | 460 | continue; |
462 | 461 | ||
463 | bdp = &mem_data[node].bootmem_data; | 462 | bdp = &bootmem_node_data[node]; |
464 | pernode = mem_data[node].pernode_addr; | 463 | pernode = mem_data[node].pernode_addr; |
465 | pernodesize = mem_data[node].pernode_size; | 464 | pernodesize = mem_data[node].pernode_size; |
466 | map = pernode + pernodesize; | 465 | map = pernode + pernodesize; |