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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Linus Torvalds

vecāks
8b05c7e6e1
revīzija
b61bfa3c46
@@ -36,7 +36,6 @@ struct early_node_data {
|
||||
struct ia64_node_data *node_data;
|
||||
unsigned long pernode_addr;
|
||||
unsigned long pernode_size;
|
||||
struct bootmem_data bootmem_data;
|
||||
unsigned long num_physpages;
|
||||
#ifdef CONFIG_ZONE_DMA
|
||||
unsigned long num_dma_physpages;
|
||||
@@ -76,7 +75,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
|
||||
int node)
|
||||
{
|
||||
unsigned long cstart, epfn, end = start + len;
|
||||
struct bootmem_data *bdp = &mem_data[node].bootmem_data;
|
||||
struct bootmem_data *bdp = &bootmem_node_data[node];
|
||||
|
||||
epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT;
|
||||
cstart = GRANULEROUNDDOWN(start);
|
||||
@@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode,
|
||||
{
|
||||
void *cpu_data;
|
||||
int cpus = early_nr_cpus_node(node);
|
||||
struct bootmem_data *bdp = &mem_data[node].bootmem_data;
|
||||
struct bootmem_data *bdp = &bootmem_node_data[node];
|
||||
|
||||
mem_data[node].pernode_addr = pernode;
|
||||
mem_data[node].pernode_size = pernodesize;
|
||||
@@ -224,7 +223,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len,
|
||||
{
|
||||
unsigned long epfn;
|
||||
unsigned long pernodesize = 0, pernode, pages, mapsize;
|
||||
struct bootmem_data *bdp = &mem_data[node].bootmem_data;
|
||||
struct bootmem_data *bdp = &bootmem_node_data[node];
|
||||
|
||||
epfn = (start + len) >> PAGE_SHIFT;
|
||||
|
||||
@@ -440,7 +439,7 @@ void __init find_memory(void)
|
||||
efi_memmap_walk(find_max_min_low_pfn, NULL);
|
||||
|
||||
for_each_online_node(node)
|
||||
if (mem_data[node].bootmem_data.node_low_pfn) {
|
||||
if (bootmem_node_data[node].node_low_pfn) {
|
||||
node_clear(node, memory_less_mask);
|
||||
mem_data[node].min_pfn = ~0UL;
|
||||
}
|
||||
@@ -460,7 +459,7 @@ void __init find_memory(void)
|
||||
else if (node_isset(node, memory_less_mask))
|
||||
continue;
|
||||
|
||||
bdp = &mem_data[node].bootmem_data;
|
||||
bdp = &bootmem_node_data[node];
|
||||
pernode = mem_data[node].pernode_addr;
|
||||
pernodesize = mem_data[node].pernode_size;
|
||||
map = pernode + pernodesize;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user