svn commit: r352396 - stable/12/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Mon Sep 16 14:07:31 UTC 2019
Author: andrew
Date: Mon Sep 16 14:07:30 2019
New Revision: 352396
URL: https://svnweb.freebsd.org/changeset/base/352396
Log:
MFC r343876:
Add missing data barriers after storeing a new valid pagetable entry.
When moving from an invalid to a valid entry we don't need to invalidate
the tlb, however we do need to ensure the store is ordered before later
memory accesses. This is because this later access may be to a virtual
address within the newly mapped region.
Add the needed barriers to places where we don't later invalidate the
tlb. When we do invalidate the tlb there will be a barrier to correctly
order this.
This fixes a panic on boot on ThunderX2 when INVARIANTS is turned off:
panic: vm_fault_hold: fault on nofault entry, addr: 0xffff000040c11000
Reported by: jchandra
Tested by: jchandra
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D19097
Modified:
stable/12/sys/arm64/arm64/pmap.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/arm64/arm64/pmap.c
==============================================================================
--- stable/12/sys/arm64/arm64/pmap.c Mon Sep 16 13:45:31 2019 (r352395)
+++ stable/12/sys/arm64/arm64/pmap.c Mon Sep 16 14:07:30 2019 (r352396)
@@ -2935,6 +2935,7 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_ent
/* Create the new mapping */
pmap_load_store(pte, newpte);
+ dsb(ishst);
critical_exit();
intr_restore(intr);
@@ -3309,6 +3310,7 @@ validate:
} else {
/* New mapping */
pmap_load_store(l3, new_l3);
+ dsb(ishst);
}
#if VM_NRESERVLEVEL > 0
@@ -3455,6 +3457,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t
* Map the superpage.
*/
(void)pmap_load_store(l2, new_l2);
+ dsb(ishst);
atomic_add_long(&pmap_l2_mappings, 1);
CTR2(KTR_PMAP, "pmap_enter_l2: success for va %#lx in pmap %p",
More information about the svn-src-all
mailing list