From c5b3b2090700cd8bc060de8eb9f3e0fd7b0c4460 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 31 Jul 2016 12:59:10 +0000 Subject: [PATCH] Relax the barriers around a TLB invalidation to only wait on inner-shareable memory accesses. There is no need for full system barriers. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/pmap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index de093bdd2f64..ff2427b7a3c4 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -865,9 +865,9 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) sched_pin(); __asm __volatile( - "dsb sy \n" + "dsb ishst \n" "tlbi vaae1is, %0 \n" - "dsb sy \n" + "dsb ish \n" "isb \n" : : "r"(va >> PAGE_SHIFT)); sched_unpin(); @@ -879,13 +879,13 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) vm_offset_t addr; sched_pin(); - __asm __volatile("dsb sy"); + dsb(ishst); for (addr = sva; addr < eva; addr += PAGE_SIZE) { __asm __volatile( "tlbi vaae1is, %0" : : "r"(addr >> PAGE_SHIFT)); } __asm __volatile( - "dsb sy \n" + "dsb ish \n" "isb \n"); sched_unpin(); } @@ -896,9 +896,9 @@ pmap_invalidate_all(pmap_t pmap) sched_pin(); __asm __volatile( - "dsb sy \n" + "dsb ishst \n" "tlbi vmalle1is \n" - "dsb sy \n" + "dsb ish \n" "isb \n"); sched_unpin(); }