linux-stable/arch/m68k
Alexandre Ghiti 2b89c3f9d3 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:14:25 +01:00
..
68000 m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
amiga m68k: amiga: Add and use "amiga.h" 2023-10-06 10:03:02 +02:00
apollo m68k: apollo: Add and use "apollo.h" 2023-10-06 10:03:02 +02:00
atari m68k: atari: Add and use "atari.h" 2023-10-06 10:03:02 +02:00
bvme6000 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
coldfire m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
configs m68k: defconfig: Update virt_defconfig for v6.6-rc3 2023-10-06 10:03:04 +02:00
emu m68k: emu: Mark version[] __maybe_unused 2023-10-06 10:03:02 +02:00
fpsp040 m68k: fpsp040: Fix indentation by 5 spaces 2023-10-16 14:30:40 +02:00
hp300 m68k: hp300: Include "time.h" for hp300_sched_init() 2023-10-06 10:03:03 +02:00
ifpsp060 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
include mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
kernel m68k, kexec: fix the incorrect ifdeffery and build dependency of CONFIG_KEXEC 2023-12-12 17:20:17 -08:00
lib m68k: lib: Include <linux/libgcc.h> for __muldi3() 2023-10-16 14:30:40 +02:00
mac m68k: mac: Add and use "mac.h" 2023-10-06 10:03:03 +02:00
math-emu m68k: math-emu: Add missing prototypes 2023-10-06 10:03:01 +02:00
mm m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
mvme16x m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
mvme147 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
q40 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
sun3 m68k: sun3: Fix indentation by 5 or 7 spaces 2023-10-16 14:30:39 +02:00
sun3x m68k: sun3/3x: Add and use "sun3.h" 2023-10-06 10:03:04 +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 dma-mapping updates for Linux 6.7 2023-11-01 13:15:54 -10:00
Kconfig.bus m68k: coldfire: drop ISA_DMA_API support 2022-05-16 13:18:30 +10:00
Kconfig.cpu m68k: use the coherent DMA code for coldfire without data cache 2023-10-22 16:38:54 +02: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: improve config ROM setting defaults 2023-10-23 08:22:22 +10: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