summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/vm/htable.c
diff options
context:
space:
mode:
authordm120769 <none@none>2007-06-29 13:44:49 -0700
committerdm120769 <none@none>2007-06-29 13:44:49 -0700
commit8b5842f905f898fedbcdd76ce107465582367de6 (patch)
tree9428eb5fe022cce63dde8eff6cc683dd2d214a4e /usr/src/uts/i86pc/vm/htable.c
parent883492d5a933deb34cd27521e7f2756773cd27af (diff)
downloadillumos-gate-8b5842f905f898fedbcdd76ce107465582367de6.tar.gz
backout 6569219: causes 6574819
Diffstat (limited to 'usr/src/uts/i86pc/vm/htable.c')
-rw-r--r--usr/src/uts/i86pc/vm/htable.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/src/uts/i86pc/vm/htable.c b/usr/src/uts/i86pc/vm/htable.c
index 20762e2cd0..44718d836d 100644
--- a/usr/src/uts/i86pc/vm/htable.c
+++ b/usr/src/uts/i86pc/vm/htable.c
@@ -1432,13 +1432,9 @@ htable_walk(
* Find the level of the largest pagesize used by this HAT.
*/
max_mapped_level = 0;
- 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;
- }
+ 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));
@@ -1460,13 +1456,20 @@ 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.
*/
- ASSERT(l < TOP_LEVEL(hat));
- if (l >= max_mapped_level)
+ if (l >= max_mapped_level) {
va = NEXT_ENTRY_VA(va, l + 1);
+ break;
+ }
}
}