linux-stable/arch/csky
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
..
abiv1 mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
abiv2 mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
boot csky: Remove unused $(dtb-y) from boot/Makefile 2022-05-13 14:45:09 +08:00
configs csky: Minimize defconfig to support buildroot config.fragment 2020-02-21 15:43:25 +08:00
include arch/csky 2nd patches for 6.6 2023-09-01 08:02:45 -07:00
kernel Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
lib csky: delay: Add function alignment 2022-12-29 23:47:52 -05:00
mm csky: fix up lock_mm_and_find_vma() conversion 2023-06-29 23:34:29 -07:00
Kbuild csky: Move $(core-y) into arch/csky/Kbuild 2022-05-13 15:09:28 +08:00
Kconfig Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.platforms csky/Kconfig: Add Kconfig.platforms to support some drivers 2020-02-21 15:43:24 +08:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00