summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/vm/htable.c
diff options
context:
space:
mode:
authorjosephb <none@none>2007-06-25 09:19:10 -0700
committerjosephb <none@none>2007-06-25 09:19:10 -0700
commit6afbd002f91f571c8f5a31d2fa39f8b0f556b74e (patch)
tree38282d50d4dabb02b142a79482cb3f6f6ece8cb7 /usr/src/uts/i86pc/vm/htable.c
parentcb820b39c5f2d3afe5da58276ca6ea09d872fd65 (diff)
downloadillumos-gate-6afbd002f91f571c8f5a31d2fa39f8b0f556b74e.tar.gz
6569219 wasted time at amd64 boot - issues with htable_walk()
Diffstat (limited to 'usr/src/uts/i86pc/vm/htable.c')
-rw-r--r--usr/src/uts/i86pc/vm/htable.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/usr/src/uts/i86pc/vm/htable.c b/usr/src/uts/i86pc/vm/htable.c
index 44718d836d..20762e2cd0 100644
--- a/usr/src/uts/i86pc/vm/htable.c
+++ b/usr/src/uts/i86pc/vm/htable.c
@@ -1432,9 +1432,13 @@ htable_walk(
* Find the level of the largest pagesize used by this HAT.
*/
max_mapped_level = 0;
- for (l = 1; l <= mmu.max_page_level; ++l)
- if (hat->hat_pages_mapped[l] != 0)
- max_mapped_level = l;
+ if (hat->hat_ism_pgcnt > 0) {
+ max_mapped_level = mmu.max_page_level;
+ } else {
+ for (l = 1; l <= mmu.max_page_level; ++l)
+ if (hat->hat_pages_mapped[l] != 0)
+ max_mapped_level = l;
+ }
while (va < eaddr && va >= *vaddr) {
ASSERT(!IN_VA_HOLE(va));
@@ -1456,20 +1460,13 @@ htable_walk(
}
/*
- * The ht is never NULL at the top level since
- * the top level htable is created in hat_alloc().
- */
- ASSERT(l < TOP_LEVEL(hat));
-
- /*
* No htable covers the address. If there is no
* larger page size that could cover it, we
* skip to the start of the next page table.
*/
- if (l >= max_mapped_level) {
+ ASSERT(l < TOP_LEVEL(hat));
+ if (l >= max_mapped_level)
va = NEXT_ENTRY_VA(va, l + 1);
- break;
- }
}
}