Author: alc
Date: Thu Jul 31 16:17:30 2014
New Revision: 269339
URL: http://svnweb.freebsd.org/changeset/base/269339

Log:
  Correct a defect in r268591.  In the implementation of the new function
  pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before
  any changes are made to the PVO.  Otherwise, MOEA64_PVO_TO_PTE() will
  panic.
  
  Reported by:  andreast

Modified:
  head/sys/powerpc/aim/mmu_oea64.c

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c    Thu Jul 31 15:40:03 2014        
(r269338)
+++ head/sys/powerpc/aim/mmu_oea64.c    Thu Jul 31 16:17:30 2014        
(r269339)
@@ -1090,6 +1090,7 @@ moea64_unwire(mmu_t mmu, pmap_t pm, vm_o
        for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key);
            pvo != NULL && PVO_VADDR(pvo) < eva;
            pvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo)) {
+               pt = MOEA64_PVO_TO_PTE(mmu, pvo);
                if ((pvo->pvo_vaddr & PVO_WIRED) == 0)
                        panic("moea64_unwire: pvo %p is missing PVO_WIRED",
                            pvo);
@@ -1098,7 +1099,7 @@ moea64_unwire(mmu_t mmu, pmap_t pm, vm_o
                        panic("moea64_unwire: pte %p is missing LPTE_WIRED",
                            &pvo->pvo_pte.lpte);
                pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED;
-               if ((pt = MOEA64_PVO_TO_PTE(mmu, pvo)) != -1) {
+               if (pt != -1) {
                        /*
                         * The PTE's wired attribute is not a hardware
                         * feature, so there is no need to invalidate any TLB
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to