linux-stable/arch/riscv
Alexandre Ghiti 7a92fc8b4d mm: Introduce flush_cache_vmap_early()
The pcpu setup when using the page allocator sets up a new vmalloc
mapping very early in the boot process, so early that it cannot use the
flush_cache_vmap() function which may depend on structures not yet
initialized (for example in riscv, we currently send an IPI to flush
other cpus TLB).

But on some architectures, we must call flush_cache_vmap(): for example,
in riscv, some uarchs can cache invalid TLB entries so we need to flush
the new established mapping to avoid taking an exception.

So fix this by introducing a new function flush_cache_vmap_early() which
is called right after setting the new page table entry and before
accessing this new mapping. This new function implements a local flush
tlb on riscv and is no-op for other architectures (same as today).

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
2023-12-14 00:23:17 -08:00
..
boot RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
configs RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
errata
include mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
kernel RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
kvm RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
lib riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
mm mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
net
purgatory riscv: Use SYM_*() assembly macros instead of deprecated ones 2023-11-06 09:42:47 -08:00
tools
Kbuild
Kconfig RISC-V Patches for the 6.7 Merge Window, Part 2 2023-11-10 09:23:17 -08:00
Kconfig.debug riscv: Add tests for riscv module loading 2023-11-07 14:59:32 -08:00
Kconfig.errata
Kconfig.socs
Makefile Merge patch "drivers: perf: Do not broadcast to other cpus when starting a counter" 2023-11-09 06:44:13 -08:00
Makefile.postlink