Author: alc
Date: Sun Jun 23 21:06:56 2019
New Revision: 349323
URL: https://svnweb.freebsd.org/changeset/base/349323

Log:
  pmap_enter_quick_locked() never replaces a valid mapping, so it need not
  perform a TLB invalidation.  A barrier suffices.  (See r343876.)
  
  Add a comment to pmap_enter_quick_locked() in order to highlight the
  fact that it does not replace valid mappings.
  
  Correct a typo in one of pmap_enter()'s comments.
  
  MFC after:    1 week

Modified:
  head/sys/arm64/arm64/pmap.c

Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c Sun Jun 23 19:37:12 2019        (r349322)
+++ head/sys/arm64/arm64/pmap.c Sun Jun 23 21:06:56 2019        (r349323)
@@ -3408,7 +3408,7 @@ validate:
                            __func__, pmap, va, new_l3);
                }
        } else {
-               /* New mappig */
+               /* New mapping */
                pmap_load_store(l3, new_l3);
                dsb(ishst);
        }
@@ -3706,6 +3706,9 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v
                l3 = pmap_l2_to_l3(pde, va);
        }
 
+       /*
+        * Abort if a mapping already exists.
+        */
        if (pmap_load(l3) != 0) {
                if (mpte != NULL) {
                        mpte->wire_count--;
@@ -3755,7 +3758,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v
                cpu_icache_sync_range(PHYS_TO_DMAP(pa), PAGE_SIZE);
 
        pmap_load_store(l3, l3_val);
-       pmap_invalidate_page(pmap, va);
+       dsb(ishst);
        return (mpte);
 }
 
_______________________________________________
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