riscv: add ASID-based tlbflushing methods
authorGuo Ren <guoren@linux.alibaba.com>
Sun, 6 Jun 2021 15:20:50 +0000 (17:20 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 1 Jul 2021 03:55:39 +0000 (20:55 -0700)
commit3f1e782998cdf6dac037588b99b10b787b00810a
treec8b733eb062e7763841a9411b8c4acd9506f0fe6
parent70c7605c08c5979e5148085903bfed5feac09406
riscv: add ASID-based tlbflushing methods

Implement optimized version of the tlb flushing routines for systems
using ASIDs. These are behind the use_asid_allocator static branch to
not affect existing systems not using ASIDs.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
[hch: rebased on top of previous cleanups, use the same algorithm as
      the non-ASID based code for local vs global flushes, keep functions
      as local as possible]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/mmu_context.h
arch/riscv/mm/context.c
arch/riscv/mm/tlbflush.c