aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/mm/context.c
diff options
context:
space:
mode:
authorGravatar Dylan Jhong <dylan@andestech.com> 2023-03-13 11:49:06 +0800
committerGravatar Palmer Dabbelt <palmer@rivosinc.com> 2023-03-21 15:55:19 -0700
commit9a801afd3eb95e1a89aba17321062df06fb49d98 (patch)
treee1704fae1280ad2bf13b593e7141eaa54ae74e77 /arch/riscv/mm/context.c
parentRISC-V: mm: Support huge page in vmalloc_fault() (diff)
downloadlinux-9a801afd3eb95e1a89aba17321062df06fb49d98.tar.gz
linux-9a801afd3eb95e1a89aba17321062df06fb49d98.tar.bz2
linux-9a801afd3eb95e1a89aba17321062df06fb49d98.zip
riscv: mm: Fix incorrect ASID argument when flushing TLB
Currently, we pass the CONTEXTID instead of the ASID to the TLB flush function. We should only take the ASID field to prevent from touching the reserved bit field. Fixes: 3f1e782998cd ("riscv: add ASID-based tlbflushing methods") Signed-off-by: Dylan Jhong <dylan@andestech.com> Reviewed-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> Link: https://lore.kernel.org/r/20230313034906.2401730-1-dylan@andestech.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/mm/context.c')
-rw-r--r--arch/riscv/mm/context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c
index 0f784e3d307b..12e22e7330e7 100644
--- a/arch/riscv/mm/context.c
+++ b/arch/riscv/mm/context.c
@@ -22,7 +22,7 @@ DEFINE_STATIC_KEY_FALSE(use_asid_allocator);
static unsigned long asid_bits;
static unsigned long num_asids;
-static unsigned long asid_mask;
+unsigned long asid_mask;
static atomic_long_t current_version;