aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGravatar Alexandre Ghiti <alexghiti@rivosinc.com> 2024-01-23 14:27:30 +0100
committerGravatar Dennis Zhou <dennis@kernel.org> 2024-01-29 00:53:19 -0800
commitebd4acc0cbeae9efea15993b11b05bd32942f3f0 (patch)
tree69b605a9d5eca1afa5e1211dbbef7006eef283db /arch
parentLinux 6.8-rc2 (diff)
downloadlinux-ebd4acc0cbeae9efea15993b11b05bd32942f3f0.tar.gz
linux-ebd4acc0cbeae9efea15993b11b05bd32942f3f0.tar.bz2
linux-ebd4acc0cbeae9efea15993b11b05bd32942f3f0.zip
riscv: Fix wrong size passed to local_flush_tlb_range_asid()
local_flush_tlb_range_asid() takes the size as argument, not the end of the range to flush, so fix this by computing the size from the end and the start of the range. Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()") Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Signed-off-by: Dennis Zhou <dennis@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/mm/tlbflush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
index 8d12b26f5ac3..9619965f6501 100644
--- a/arch/riscv/mm/tlbflush.c
+++ b/arch/riscv/mm/tlbflush.c
@@ -68,7 +68,7 @@ static inline void local_flush_tlb_range_asid(unsigned long start,
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
{
- local_flush_tlb_range_asid(start, end, PAGE_SIZE, FLUSH_TLB_NO_ASID);
+ local_flush_tlb_range_asid(start, end - start, PAGE_SIZE, FLUSH_TLB_NO_ASID);
}
static void __ipi_flush_tlb_all(void *info)