Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138475
b: refs/heads/master
c: 13870b6
h: refs/heads/master
i:
  138473: c4701fa
  138471: 3c3e3b6
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Feb 22, 2009
1 parent d25d655 commit 74d3f89
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 33f00dcedb0e22cdb156a23632814fc580fcfcf8
refs/heads/master: 13870b657578bcce167978ee93dc02bf54e3beb0
5 changes: 3 additions & 2 deletions trunk/arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ static int __init htab_dt_scan_pftsize(unsigned long node,

static unsigned long __init htab_get_table_size(void)
{
unsigned long mem_size, rnd_mem_size, pteg_count;
unsigned long mem_size, rnd_mem_size, pteg_count, psize;

/* If hash size isn't already provided by the platform, we try to
* retrieve it from the device-tree. If it's not there neither, we
Expand All @@ -534,7 +534,8 @@ static unsigned long __init htab_get_table_size(void)
rnd_mem_size <<= 1;

/* # pages / 2 */
pteg_count = max(rnd_mem_size >> (12 + 1), 1UL << 11);
psize = mmu_psize_defs[mmu_virtual_psize].shift;
pteg_count = max(rnd_mem_size >> (psize + 1), 1UL << 11);

return pteg_count << 7;
}
Expand Down

0 comments on commit 74d3f89

Please sign in to comment.