From f54153bb0835a452853e9b1727c9ddd50e91d74f Mon Sep 17 00:00:00 2001 From: Wojciech Macek Date: Mon, 14 Mar 2016 07:26:38 +0000 Subject: [PATCH] pmap arm64: fixing pmap_invalidate_range It seems that if range within one page is given this page will not be invalidated at all. Clean it up. Submitted by: Dominik Ermel Obtained from: Semihalf Sponsored by: Cavium Reviewed by: wma, zbb Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D5569 --- sys/arm64/arm64/pmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index abc65814e6d1..5db731d13be0 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -772,12 +772,10 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) vm_offset_t addr; sched_pin(); - sva >>= PAGE_SHIFT; - eva >>= PAGE_SHIFT; __asm __volatile("dsb sy"); - for (addr = sva; addr < eva; addr++) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) { __asm __volatile( - "tlbi vaae1is, %0" : : "r"(addr)); + "tlbi vaae1is, %0" : : "r"(addr >> PAGE_SHIFT)); } __asm __volatile( "dsb sy \n"