kernel - Fix pmap_remove() issue.
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 24 Aug 2012 03:44:53 +0000 (20:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 24 Aug 2012 03:44:53 +0000 (20:44 -0700)
commit554cf9ac8ff4af8eedd0f5896dfa5d2e5f61038d
treee4f2bd8af5b2734e7b2455daa42220463b8d7455
parente917a7645571ee28f67a9bd1c358dbcda9161d18
kernel - Fix pmap_remove() issue.

* When the inner loop of pmap_remove() broke out due to pmap_remove_pte()
  blocking it 'jumped' the sindex to pdnxt, thus any remaining pages in
  that page table page would get skipped.

* pmap_remove_pte() and friends used to return non-zero if they 'blocked'.
  Unfortunately they could actually block whether they returned 0 or non-zero,
  causing the problem.  Remove the check entirely.

* Adjust misc functions which we no longer need the return value for.

* I don't know if this had anything to do with the wire_count panic.
  The failure mode should have been caught by numerous other assertions
  in the code but wasn't.  get_ptbase() relies on a test of pmap->pm_cached
  to determine if a page directory page mapping changes so it should not
  have been possible for it to continue the loop and access a stale ptep.

  If it were possible it might account for a wire_count panic later on but
  it doesn't seem like it should be possible.
sys/platform/pc32/i386/pmap.c