Skip to content

Commit 3951f6a

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask
We must clear the cpumask once we have flushed the batch, otherwise cpus get accumulated and we end sending IPIs to more cpus than needed. Fixes: 54d7431 ("riscv: Add support for BATCHED_UNMAP_TLB_FLUSH") Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Reviewed-by: Jisheng Zhang <jszhang@kernel.org> Link: https://lore.kernel.org/r/20240130115508.105386-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 2cf9637 commit 3951f6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/mm/tlbflush.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,5 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
234234
{
235235
__flush_tlb_range(&batch->cpumask, FLUSH_TLB_NO_ASID, 0,
236236
FLUSH_TLB_MAX_SIZE, PAGE_SIZE);
237+
cpumask_clear(&batch->cpumask);
237238
}

0 commit comments

Comments
 (0)