linux-stable/arch/riscv
Alexandre Ghiti 9d4e8d5fa7
riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb
Currently, when the range to flush covers more than one page (a 4K page or
a hugepage), __flush_tlb_range() flushes the whole tlb. Flushing the whole
tlb comes with a greater cost than flushing a single entry so we should
flush single entries up to a certain threshold so that:
threshold * cost of flushing a single entry < cost of flushing the whole
tlb.

Co-developed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # On RZ/Five SMARC
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20231030133027.19542-4-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-11-06 07:20:51 -08:00
..
boot RISC-V Devicetrees for v6.6 Part 2 2023-08-21 21:47:55 -04:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
errata Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
include riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb 2023-11-06 07:20:51 -08:00
kernel riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb 2023-11-06 07:20:51 -08:00
kvm KVM/riscv changes for 6.6 2023-08-31 13:25:55 -04:00
lib riscv: uaccess: Return the number of bytes effectively not copied 2023-08-16 07:30:06 -07:00
mm riscv: Make __flush_tlb_range() loop over pte instead of flushing the whole tlb 2023-11-06 07:20:51 -08:00
net bpf, riscv: use prog pack allocator in the BPF JIT 2023-09-06 06:26:07 -07:00
purgatory riscv/purgatory: Disable CFI 2023-08-23 14:16:40 -07:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild kexec: rename ARCH_HAS_KEXEC_PURGATORY 2023-08-18 10:18:54 -07:00
Kconfig riscv: Kconfig: Select DMA_DIRECT_REMAP only if MMU is enabled 2023-09-08 11:25:26 -07:00
Kconfig.debug
Kconfig.errata riscv: Kconfig.errata: Add dependency for RISCV_SBI in ERRATA_ANDES config 2023-09-08 11:25:28 -07:00
Kconfig.socs RISC-V: make ARCH_THEAD preclude XIP_KERNEL 2023-07-05 22:21:23 +02:00
Makefile riscv: Require FRAME_POINTER for some configurations 2023-08-23 09:07:26 -07:00
Makefile.postlink riscv: Use --emit-relocs in order to move .rela.dyn in init 2023-04-19 07:46:33 -07:00