Author: jhibbits
Date: Mon Jul 22 22:59:50 2019
New Revision: 350232
URL: https://svnweb.freebsd.org/changeset/base/350232

Log:
  powerpc: Unbreak 64-bit pmap from 350206
  
  oldpvo is never explicitly NULL'd by moea64_pvo_enter(), so don't check for
  NULL to do anything, only check error.
  
  PR:           239372
  Reported by:  Francis Little

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

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c    Mon Jul 22 22:41:44 2019        
(r350231)
+++ head/sys/powerpc/aim/mmu_oea64.c    Mon Jul 22 22:59:50 2019        
(r350232)
@@ -1449,13 +1449,13 @@ moea64_enter(mmu_t mmu, pmap_t pmap, vm_offset_t va, v
                        KASSERT(oldpvo->pvo_pmap == pmap, ("pmap of old "
                            "mapping does not match new mapping"));
                        moea64_pvo_remove_from_pmap(mmu, oldpvo);
-                       error = moea64_pvo_enter(mmu, pvo, pvo_head, NULL);
+                       moea64_pvo_enter(mmu, pvo, pvo_head, NULL);
                }
                PV_PAGE_UNLOCK(m);
                PMAP_UNLOCK(pmap);
 
                /* Free any dead pages */
-               if (oldpvo != NULL) {
+               if (error == EEXIST) {
                        moea64_pvo_remove_from_page(mmu, oldpvo);
                        free_pvo_entry(oldpvo);
                }
@@ -2521,8 +2521,6 @@ moea64_pvo_enter(mmu_t mmu, struct pvo_entry *pvo, str
        struct pvo_entry *old_pvo;
 
        PMAP_LOCK_ASSERT(pvo->pvo_pmap, MA_OWNED);
-       KASSERT(moea64_pvo_find_va(pvo->pvo_pmap, PVO_VADDR(pvo)) == NULL,
-           ("Existing mapping for VA %#jx", (uintmax_t)PVO_VADDR(pvo)));
 
        moea64_pvo_enter_calls++;
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to