Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6213
b: refs/heads/master
c: 71e1f55
h: refs/heads/master
i:
  6211: 2d34adf
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Aug 29, 2005
1 parent 47c6b00 commit bbd6edd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 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: 180379dcefb39e8bd05d562b0685e9084dffcc0a
refs/heads/master: 71e1f55ad4bc4c8bcfe696400a950a34263a750e
27 changes: 5 additions & 22 deletions trunk/arch/ppc64/kernel/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,12 @@ lmb_init(void)
void __init
lmb_analyze(void)
{
unsigned long i;
unsigned long mem_size = 0;
unsigned long size_mask = 0;

for (i=0; i < lmb.memory.cnt; i++) {
unsigned long lmb_size;
int i;

lmb_size = lmb.memory.region[i].size;
lmb.memory.size = 0;

mem_size += lmb_size;
size_mask |= lmb_size;
}

lmb.memory.size = mem_size;
for (i = 0; i < lmb.memory.cnt; i++)
lmb.memory.size += lmb.memory.region[i].size;
}

/* This routine called with relocation disabled. */
Expand Down Expand Up @@ -266,20 +258,11 @@ lmb_alloc_base(unsigned long size, unsigned long align, unsigned long max_addr)
return base;
}

/* You must call lmb_analyze() before this. */
unsigned long __init
lmb_phys_mem_size(void)
{
#ifdef CONFIG_MSCHUNKS
return lmb.memory.size;
#else
unsigned long total = 0;
int i;

/* add all physical memory to the bootmem map */
for (i=0; i < lmb.memory.cnt; i++)
total += lmb.memory.region[i].size;
return total;
#endif /* CONFIG_MSCHUNKS */
}

unsigned long __init
Expand Down

0 comments on commit bbd6edd

Please sign in to comment.