linux/arch
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
..
alpha TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
arc mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
arm mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
arm64 arm64: Avoid enabling KPTI unnecessarily 2023-11-30 19:07:33 +00:00
csky mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
hexagon TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
loongarch LoongArch: Implement constant timer shutdown interface 2023-11-21 15:03:25 +08:00
m68k mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
microblaze asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
mips mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
nios2 mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
powerpc KVM: PPC: Book3S HV: Fix KVM_RUN clobbering FP/VEC user registers 2023-11-29 22:24:21 +11:00
riscv mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
s390 s390: remove odd comment 2023-11-22 13:55:13 +01:00
sh mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
sparc mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
um um,ethertap: Replace deprecated strncpy() with strscpy() 2023-09-29 11:37:50 -07:00
x86 xen: branch for v6.7-rc4 2023-12-03 08:31:53 +09:00
xtensa mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
.gitignore
Kconfig arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00