Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201501
b: refs/heads/master
c: 3260e52
h: refs/heads/master
i:
  201499: 98565ad
v: v3
  • Loading branch information
Michael Bohan authored and Daniel Walker committed Jun 15, 2010
1 parent a6fafd4 commit ca39bd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 923a081c72fa2dccb7ea7070bd8e0f4dc99ceff8
refs/heads/master: 3260e5293727f16ffdce9a6a6203fd9a6b149e58
19 changes: 9 additions & 10 deletions trunk/arch/arm/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,28 +495,27 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi)
unsigned int i;

/*
* [FIXME] This relies on each bank being in address order. This
* may not be the case, especially if the user has provided the
* information on the command line.
* This relies on each bank being in address order.
* The banks are sorted previously in bootmem_init().
*/
for_each_nodebank(i, mi, node) {
struct membank *bank = &mi->bank[i];

bank_start = bank_pfn_start(bank);
if (bank_start < prev_bank_end) {
printk(KERN_ERR "MEM: unordered memory banks. "
"Not freeing memmap.\n");
break;
}

/*
* If we had a previous bank, and there is a space
* between the current bank and the previous, free it.
*/
if (prev_bank_end && prev_bank_end != bank_start)
if (prev_bank_end && prev_bank_end < bank_start)
free_memmap(node, prev_bank_end, bank_start);

prev_bank_end = bank_pfn_end(bank);
/*
* Align up here since the VM subsystem insists that the
* memmap entries are valid from the bank end aligned to
* MAX_ORDER_NR_PAGES.
*/
prev_bank_end = ALIGN(bank_pfn_end(bank), MAX_ORDER_NR_PAGES);
}
}

Expand Down

0 comments on commit ca39bd2

Please sign in to comment.