riscv: mm: Combine the SMP and UP TLB flush code
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 27 Mar 2024 04:49:47 +0000 (21:49 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 29 Apr 2024 17:49:29 +0000 (10:49 -0700)
commitc6026d35b6abb5bd954788478bfa800a942e2033
treebadedd72ce527c0c09402f70bdaddc32e0149128
parent9546f00410ed88b8117388cfd74ea59f4616a158
riscv: mm: Combine the SMP and UP TLB flush code

In SMP configurations, all TLB flushing narrower than flush_tlb_all()
goes through __flush_tlb_range(). Do the same in UP configurations.

This allows UP configurations to take advantage of recent improvements
to the code in tlbflush.c, such as support for huge pages and flushing
multiple-page ranges.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Yunhui Cui <cuiyunhui@bytedance.com>
Link: https://lore.kernel.org/r/20240327045035.368512-7-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/tlbflush.h
arch/riscv/mm/Makefile