lkml.org 
[lkml]   [2024]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH -fixes] riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask
From
Hi Alex,

On 2024-01-30 5:55 AM, Alexandre Ghiti wrote:
> 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);
> }

This patch doesn't apply to fixes -- it looks like it was based on "riscv: Call
secondary mmu notifier when flushing the tlb"[1], which has not been merged and
would go in for-next anyway. Otherwise:

Reviewed-by: Samuel Holland <samuel.holland@sifive.com>

[1]: https://lore.kernel.org/all/20240124080325.2324462-1-alexghiti@rivosinc.com/


\
 
 \ /
  Last update: 2024-05-27 14:53    [W:0.053 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site