linux-stable/arch/m68k
Alexandre Ghiti c4a05cf0ed mm: Introduce flush_cache_vmap_early()
[ Upstream commit 7a92fc8b4d ]

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>
Stable-dep-of: d9807d60c1 ("riscv: mm: execute local TLB flush after populating vmemmap")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-16 19:10:52 +01:00
..
68000 m68knommu: updates and fixes for v6.3 2023-02-27 09:31:02 -08:00
amiga
apollo
atari for-5.18/block-2022-03-18 2022-03-21 16:48:55 -07:00
bvme6000 for-5.18/block-2022-03-18 2022-03-21 16:48:55 -07:00
coldfire m68k: coldfire: dma_timer: ERROR: "foo __init bar" should be "foo __init bar" 2023-08-21 08:45:36 +10:00
configs - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
emu tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
fpsp040 m68k: Fix invalid .section syntax 2023-07-24 14:50:02 +02:00
hp300 m68k: removed unused "mach_get_ss" 2022-05-25 00:04:11 +10:00
ifpsp060 m68k: Fix invalid .section syntax 2023-07-24 14:50:02 +02:00
include mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
kernel m68knommu: updates and fixes for v6.6 2023-09-04 11:34:33 -07:00
lib m68k: Replace #include <asm/export.h> with #include <linux/export.h> 2023-08-21 13:27:43 +02:00
mac m68k: mac: Reword comment using double "in" 2022-11-01 12:17:56 +01:00
math-emu m68k: math-emu: Fix typos in comments 2022-05-09 13:13:59 +02:00
mm m68k: implement the new page table range API 2023-08-24 16:20:21 -07:00
mvme16x for-5.18/block-2022-03-18 2022-03-21 16:48:55 -07:00
mvme147 for-5.18/block-2022-03-18 2022-03-21 16:48:55 -07:00
q40 m68k: q40: Do not initialise statics to 0 2023-01-30 16:39:43 +01:00
sun3 m68k: Pass a pointer to virt_to_pfn() virt_to_page() 2023-05-29 11:27:07 +02:00
sun3x m68k: Pass a pointer to virt_to_pfn() virt_to_page() 2023-05-29 11:27:07 +02:00
tools/amiga
virt m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEED 2022-09-28 22:16:44 +02:00
Kbuild m68k: Introduce a virtual m68k machine 2022-04-11 11:48:01 +02:00
Kconfig m68k/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:53 -07:00
Kconfig.bus m68k: coldfire: drop ISA_DMA_API support 2022-05-16 13:18:30 +10:00
Kconfig.cpu - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
Kconfig.debug m68k: Remove obsolete config NO_KERNEL_MSG 2023-03-20 15:39:14 +01:00
Kconfig.devices m68k: /proc/hardware should depend on PROC_FS 2023-02-13 11:34:49 +01:00
Kconfig.machine m68knommu: updates and fixes for v6.4 2023-04-28 16:37:54 -07:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00