public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask
@ 2024-01-30 11:55 Alexandre Ghiti
  2024-02-06  0:26 ` Charlie Jenkins
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2024-01-30 11:55 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang,
	Alexandre Ghiti, linux-riscv, linux-kernel

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: 54d7431af73e ("riscv: Add support for BATCHED_UNMAP_TLB_FLUSH")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
 arch/riscv/mm/tlbflush.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c
index 99c3e037f127..c8efc3f87a0f 100644
--- a/arch/riscv/mm/tlbflush.c
+++ b/arch/riscv/mm/tlbflush.c
@@ -240,4 +240,5 @@ void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch)
 {
 	__flush_tlb_range(NULL, &batch->cpumask,
 			  0, FLUSH_TLB_MAX_SIZE, PAGE_SIZE);
+	cpumask_clear(&batch->cpumask);
 }
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-08  1:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 11:55 [PATCH -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask Alexandre Ghiti
2024-02-06  0:26 ` Charlie Jenkins
2024-02-06 10:15   ` Jisheng Zhang
2024-02-07 19:23 ` Samuel Holland
2024-02-07 19:35   ` Palmer Dabbelt
2024-02-08  1:30 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox