[PATCH 4/9] x86/mm: Use __flush_tlb_one() for kernel memory

From: Peter Zijlstra
Date: Tue Dec 05 2017 - 07:41:41 EST


__flush_tlb_single() is for user mappings, __flush_tlb_one() for
kernel mappings.

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
arch/x86/mm/tlb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -605,9 +605,7 @@ static void do_kernel_range_flush(void *

/* flush range by one by one 'invlpg' */
for (addr = f->start; addr < f->end; addr += PAGE_SIZE)
- __flush_tlb_single(addr);
-
- invalidate_pcid_other();
+ __flush_tlb_one(addr);
}

void flush_tlb_kernel_range(unsigned long start, unsigned long end)