Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29557
b: refs/heads/master
c: 486ad10
h: refs/heads/master
i:
  29555: 9e2570c
v: v3
  • Loading branch information
David S. Miller committed Jun 24, 2006
1 parent 8d93952 commit 43161f8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 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: 07f8e5f358a0b7240f1dad6b3819f2fd1103f159
refs/heads/master: 486ad10a7e1b2bb61ea9e48c4d9510f50cd74fc5
21 changes: 19 additions & 2 deletions trunk/arch/sparc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ static void __init read_obp_memory(const char *property,
prom_halt();
}

*num_ents = ents;

/* Sanitize what we got from the firmware, by page aligning
* everything.
*/
Expand All @@ -125,6 +123,25 @@ static void __init read_obp_memory(const char *property,
regs[i].phys_addr = base;
regs[i].reg_size = size;
}

for (i = 0; i < ents; i++) {
if (regs[i].reg_size == 0UL) {
int j;

for (j = i; j < ents - 1; j++) {
regs[j].phys_addr =
regs[j+1].phys_addr;
regs[j].reg_size =
regs[j+1].reg_size;
}

ents--;
i--;
}
}

*num_ents = ents;

sort(regs, ents, sizeof(struct linux_prom64_registers),
cmp_p64, NULL);
}
Expand Down

0 comments on commit 43161f8

Please sign in to comment.