summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2021-06-06 18:20:50 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-07-01 06:55:39 +0300
commit3f1e782998cdf6dac037588b99b10b787b00810a (patch)
treec8b733eb062e7763841a9411b8c4acd9506f0fe6 /arch/riscv/include
parent70c7605c08c5979e5148085903bfed5feac09406 (diff)
downloadlinux-3f1e782998cdf6dac037588b99b10b787b00810a.tar.xz
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>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/mmu_context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h
index b0659413a080..7030837adc1a 100644
--- a/arch/riscv/include/asm/mmu_context.h
+++ b/arch/riscv/include/asm/mmu_context.h
@@ -33,6 +33,8 @@ static inline int init_new_context(struct task_struct *tsk,
return 0;
}
+DECLARE_STATIC_KEY_FALSE(use_asid_allocator);
+
#include <asm-generic/mmu_context.h>
#endif /* _ASM_RISCV_MMU_CONTEXT_H */