linux-stable/arch/riscv/mm
Alexandre Ghiti c962a6e746
riscv: Improve flush_tlb_range() for hugetlb pages
flush_tlb_range() uses a fixed stride of PAGE_SIZE and in its current form,
when a hugetlb mapping needs to be flushed, flush_tlb_range() flushes the
whole tlb: so set a stride of the size of the hugetlb mapping in order to
only flush the hugetlb mapping. However, if the hugepage is a NAPOT region,
all PTEs that constitute this mapping must be invalidated, so the stride
size must actually be the size of the PTE.

Note that THPs are directly handled by flush_pmd_tlb_range().

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # On RZ/Five SMARC
Link: https://lore.kernel.org/r/20231030133027.19542-3-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-11-06 07:20:50 -08:00
..
cacheflush.c riscv: implement the new page table range API 2023-08-24 16:20:23 -07:00
context.c riscv: mm: use bitmap_zero() API 2023-08-31 00:18:29 -07:00
dma-noncoherent.c Merge patch series "Add non-coherent DMA support for AX45MP" 2023-09-08 11:24:34 -07:00
extable.c riscv: extable: fix err reg writing in dedicated uaccess handler 2022-02-08 17:02:47 -08:00
fault.c mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED 2023-08-24 16:20:17 -07:00
hugetlbpage.c mm: riscv: fix an unsafe pte read in huge_pte_alloc() 2023-07-05 07:24:17 -07:00
init.c Merge patch series "riscv: Introduce KASLR" 2023-09-08 11:25:13 -07:00
kasan_init.c RISC-V Patches for the 6.6 Merge Window, Part 1 2023-09-01 08:09:48 -07:00
Makefile riscv: mm: stub extable related functions/macros for !MMU 2023-06-14 07:17:45 -07:00
pageattr.c mm: enable page walking API to lock vmas during the walk 2023-08-21 13:07:20 -07:00
pgtable.c riscv: mm: Implement pmdp_collapse_flush for THP 2023-02-01 20:52:09 -08:00
physaddr.c riscv: Use PUD/P4D/PGD pages for the linear mapping 2023-04-18 20:43:04 -07:00
pmem.c riscv: mm: dma-noncoherent: nonstandard cache operations support 2023-09-01 09:08:57 -07:00
ptdump.c riscv: Fix ptdump when KASAN is enabled 2023-04-19 07:24:53 -07:00
tlbflush.c riscv: Improve flush_tlb_range() for hugetlb pages 2023-11-06 07:20:50 -08:00