diff options
author | Johannes Weiner <hannes@saeurebad.de> | 2008-07-24 00:26:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:14 -0400 |
commit | 8ae04463077324ed9f6b04ab3a5b17ae1ee4dd35 (patch) | |
tree | 2982394dd832fc105bddf759e007ba158a10c3ed /mm | |
parent | 6b312c0e6e2f44b020e12953d1dd37eed60e3609 (diff) |
mm: normalize internal argument passing of bootmem data
All _core functions only need the bootmem data, not the whole node descriptor.
Adjust the two functions that take the node descriptor unneededly.
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Cc: Ingo Molnar <mingo@elte.hu>
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 'mm')
-rw-r--r-- | mm/bootmem.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index 319a79bce7cd..251c66c5d96a 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -87,10 +87,9 @@ static unsigned long __init get_mapsize(bootmem_data_t *bdata) | |||
87 | /* | 87 | /* |
88 | * Called once to set up the allocator itself. | 88 | * Called once to set up the allocator itself. |
89 | */ | 89 | */ |
90 | static unsigned long __init init_bootmem_core(pg_data_t *pgdat, | 90 | static unsigned long __init init_bootmem_core(bootmem_data_t *bdata, |
91 | unsigned long mapstart, unsigned long start, unsigned long end) | 91 | unsigned long mapstart, unsigned long start, unsigned long end) |
92 | { | 92 | { |
93 | bootmem_data_t *bdata = pgdat->bdata; | ||
94 | unsigned long mapsize; | 93 | unsigned long mapsize; |
95 | 94 | ||
96 | mminit_validate_memmodel_limits(&start, &end); | 95 | mminit_validate_memmodel_limits(&start, &end); |
@@ -372,11 +371,10 @@ found: | |||
372 | return ret; | 371 | return ret; |
373 | } | 372 | } |
374 | 373 | ||
375 | static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat) | 374 | static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) |
376 | { | 375 | { |
377 | struct page *page; | 376 | struct page *page; |
378 | unsigned long pfn; | 377 | unsigned long pfn; |
379 | bootmem_data_t *bdata = pgdat->bdata; | ||
380 | unsigned long i, count; | 378 | unsigned long i, count; |
381 | unsigned long idx; | 379 | unsigned long idx; |
382 | unsigned long *map; | 380 | unsigned long *map; |
@@ -441,7 +439,7 @@ static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat) | |||
441 | unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn, | 439 | unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn, |
442 | unsigned long startpfn, unsigned long endpfn) | 440 | unsigned long startpfn, unsigned long endpfn) |
443 | { | 441 | { |
444 | return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); | 442 | return init_bootmem_core(pgdat->bdata, freepfn, startpfn, endpfn); |
445 | } | 443 | } |
446 | 444 | ||
447 | int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | 445 | int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, |
@@ -466,14 +464,14 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | |||
466 | unsigned long __init free_all_bootmem_node(pg_data_t *pgdat) | 464 | unsigned long __init free_all_bootmem_node(pg_data_t *pgdat) |
467 | { | 465 | { |
468 | register_page_bootmem_info_node(pgdat); | 466 | register_page_bootmem_info_node(pgdat); |
469 | return free_all_bootmem_core(pgdat); | 467 | return free_all_bootmem_core(pgdat->bdata); |
470 | } | 468 | } |
471 | 469 | ||
472 | unsigned long __init init_bootmem(unsigned long start, unsigned long pages) | 470 | unsigned long __init init_bootmem(unsigned long start, unsigned long pages) |
473 | { | 471 | { |
474 | max_low_pfn = pages; | 472 | max_low_pfn = pages; |
475 | min_low_pfn = start; | 473 | min_low_pfn = start; |
476 | return init_bootmem_core(NODE_DATA(0), start, 0, pages); | 474 | return init_bootmem_core(NODE_DATA(0)->bdata, start, 0, pages); |
477 | } | 475 | } |
478 | 476 | ||
479 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 477 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
@@ -504,7 +502,7 @@ void __init free_bootmem(unsigned long addr, unsigned long size) | |||
504 | 502 | ||
505 | unsigned long __init free_all_bootmem(void) | 503 | unsigned long __init free_all_bootmem(void) |
506 | { | 504 | { |
507 | return free_all_bootmem_core(NODE_DATA(0)); | 505 | return free_all_bootmem_core(NODE_DATA(0)->bdata); |
508 | } | 506 | } |
509 | 507 | ||
510 | void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, | 508 | void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, |