diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2020-02-01 11:04:31 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-02-19 14:46:08 +0300 |
commit | 030e347430957f6f7f29db9099368f8b86c0bf76 (patch) | |
tree | 91d3131cbb84c63dcf140c60fcca573e0a1b4f67 /arch/powerpc/mm/book3s32/tlb.c | |
parent | d8e73458f33a24810413ee3a0cd020b644de2f98 (diff) | |
download | linux-030e347430957f6f7f29db9099368f8b86c0bf76.tar.xz |
powerpc/32s: Don't flush all TLBs when flushing one page
When flushing any memory range, the flushing function
flushes all TLBs.
When (start) and (end - 1) are in the same memory page,
flush that page instead.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b30b2eae6960502eaf0d9e36c60820b839693c33.1580542939.git.christophe.leroy@c-s.fr
Diffstat (limited to 'arch/powerpc/mm/book3s32/tlb.c')
-rw-r--r-- | arch/powerpc/mm/book3s32/tlb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/mm/book3s32/tlb.c b/arch/powerpc/mm/book3s32/tlb.c index 2fcd321040ff..724c0490fb17 100644 --- a/arch/powerpc/mm/book3s32/tlb.c +++ b/arch/powerpc/mm/book3s32/tlb.c @@ -79,11 +79,14 @@ static void flush_range(struct mm_struct *mm, unsigned long start, int count; unsigned int ctx = mm->context.id; + start &= PAGE_MASK; if (!Hash) { - _tlbia(); + if (end - start <= PAGE_SIZE) + _tlbie(start); + else + _tlbia(); return; } - start &= PAGE_MASK; if (start >= end) return; end = (end - 1) | ~PAGE_MASK; |