diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-06 18:39:10 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:17 -0400 |
| commit | 7590abe891c85fbc65dc906516d0bf89e070c19a (patch) | |
| tree | 4c522633ca9fb4ba1527bc20d049199a30922b44 | |
| parent | 4d629f9a02e32f8fe035a11018472ea8ff9647eb (diff) | |
memblock: Move memblock_init() to the bottom of the file
It's a real PITA to have to search for it in the middle
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
| -rw-r--r-- | mm/memblock.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index fc7f97b2d994..ae856d4e25a3 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
| @@ -107,33 +107,6 @@ static void memblock_coalesce_regions(struct memblock_type *type, | |||
| 107 | memblock_remove_region(type, r2); | 107 | memblock_remove_region(type, r2); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void __init memblock_init(void) | ||
| 111 | { | ||
| 112 | /* Hookup the initial arrays */ | ||
| 113 | memblock.memory.regions = memblock_memory_init_regions; | ||
| 114 | memblock.memory.max = INIT_MEMBLOCK_REGIONS; | ||
| 115 | memblock.reserved.regions = memblock_reserved_init_regions; | ||
| 116 | memblock.reserved.max = INIT_MEMBLOCK_REGIONS; | ||
| 117 | |||
| 118 | /* Write a marker in the unused last array entry */ | ||
| 119 | memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | ||
| 120 | memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | ||
| 121 | |||
| 122 | /* Create a dummy zero size MEMBLOCK which will get coalesced away later. | ||
| 123 | * This simplifies the memblock_add() code below... | ||
| 124 | */ | ||
| 125 | memblock.memory.regions[0].base = 0; | ||
| 126 | memblock.memory.regions[0].size = 0; | ||
| 127 | memblock.memory.cnt = 1; | ||
| 128 | |||
| 129 | /* Ditto. */ | ||
| 130 | memblock.reserved.regions[0].base = 0; | ||
| 131 | memblock.reserved.regions[0].size = 0; | ||
| 132 | memblock.reserved.cnt = 1; | ||
| 133 | |||
| 134 | memblock.current_limit = MEMBLOCK_ALLOC_ANYWHERE; | ||
| 135 | } | ||
| 136 | |||
| 137 | void __init memblock_analyze(void) | 110 | void __init memblock_analyze(void) |
| 138 | { | 111 | { |
| 139 | int i; | 112 | int i; |
| @@ -543,3 +516,30 @@ void __init memblock_set_current_limit(phys_addr_t limit) | |||
| 543 | memblock.current_limit = limit; | 516 | memblock.current_limit = limit; |
| 544 | } | 517 | } |
| 545 | 518 | ||
| 519 | void __init memblock_init(void) | ||
| 520 | { | ||
| 521 | /* Hookup the initial arrays */ | ||
| 522 | memblock.memory.regions = memblock_memory_init_regions; | ||
| 523 | memblock.memory.max = INIT_MEMBLOCK_REGIONS; | ||
| 524 | memblock.reserved.regions = memblock_reserved_init_regions; | ||
| 525 | memblock.reserved.max = INIT_MEMBLOCK_REGIONS; | ||
| 526 | |||
| 527 | /* Write a marker in the unused last array entry */ | ||
| 528 | memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | ||
| 529 | memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | ||
| 530 | |||
| 531 | /* Create a dummy zero size MEMBLOCK which will get coalesced away later. | ||
| 532 | * This simplifies the memblock_add() code below... | ||
| 533 | */ | ||
| 534 | memblock.memory.regions[0].base = 0; | ||
| 535 | memblock.memory.regions[0].size = 0; | ||
| 536 | memblock.memory.cnt = 1; | ||
| 537 | |||
| 538 | /* Ditto. */ | ||
| 539 | memblock.reserved.regions[0].base = 0; | ||
| 540 | memblock.reserved.regions[0].size = 0; | ||
| 541 | memblock.reserved.cnt = 1; | ||
| 542 | |||
| 543 | memblock.current_limit = MEMBLOCK_ALLOC_ANYWHERE; | ||
| 544 | } | ||
| 545 | |||
