Skip to content

Commit

Permalink
riscv: Fix wrong size passed to local_flush_tlb_range_asid()
Browse files Browse the repository at this point in the history
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: 7a92fc8 ("mm: Introduce flush_cache_vmap_early()")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
  • Loading branch information
Alexandre Ghiti authored and Dennis Zhou committed Jan 29, 2024
1 parent 41bccc9 commit ebd4acc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/mm/tlbflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ebd4acc

Please sign in to comment.