Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123147
b: refs/heads/master
c: 6ca4f74
h: refs/heads/master
i:
  123145: 091787f
  123143: 430f4a8
v: v3
  • Loading branch information
Hollis Blanchard authored and Paul Mackerras committed Dec 28, 2008
1 parent 8dbae98 commit f806bb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: f8f50b1bddd49eb171398cfc543c957884dc6e35
refs/heads/master: 6ca4f7494bde078b2b730e28e4ea1dc36a772f70
16 changes: 15 additions & 1 deletion trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,8 @@ static inline void __init phyp_dump_reserve_mem(void) {}

void __init early_init_devtree(void *params)
{
unsigned long limit;

DBG(" -> early_init_devtree(%p)\n", params);

/* Setup flat device-tree pointer */
Expand Down Expand Up @@ -1200,7 +1202,19 @@ void __init early_init_devtree(void *params)
early_reserve_mem();
phyp_dump_reserve_mem();

lmb_enforce_memory_limit(memory_limit);
limit = memory_limit;
if (! limit) {
unsigned long memsize;

/* Ensure that total memory size is page-aligned, because
* otherwise mark_bootmem() gets upset. */
lmb_analyze();
memsize = lmb_phys_mem_size();
if ((memsize & PAGE_MASK) != memsize)
limit = memsize & PAGE_MASK;
}
lmb_enforce_memory_limit(limit);

lmb_analyze();

DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
Expand Down

0 comments on commit f806bb9

Please sign in to comment.