linux-stable/arch/sh/include/asm
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
..
Kbuild local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
adc.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
addrspace.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
alignment.h
asm-offsets.h
atomic-grb.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic-irq.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic-llsc.h locking/atomic: sh: add preprocessor symbols 2023-06-05 09:57:16 +02:00
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bitops-cas.h
bitops-grb.h
bitops-llsc.h
bitops-op32.h provide arch_test_bit_acquire for architectures that define test_bit 2022-08-27 09:49:54 -07:00
bitops.h include: move find.h from asm_generic to linux 2022-01-15 08:47:31 -08:00
bl_bit.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bl_bit_32.h
bug.h
cache.h sh: move the ARCH_DMA_MINALIGN definition to asm/cache.h 2023-06-19 16:19:24 -07:00
cache_insns.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
cache_insns_32.h
cacheflush.h mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
checksum.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
checksum_32.h sh: checksum: add missing linux/uaccess.h include 2023-01-30 21:04:21 -08:00
clock.h
cmpxchg-cas.h
cmpxchg-grb.h
cmpxchg-irq.h
cmpxchg-llsc.h
cmpxchg-xchg.h
cmpxchg.h locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local() 2023-11-02 10:13:12 +01:00
device.h
dma-register.h
dma.h PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dmabrg.h
dwarf.h
elf.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
entry-macros.S
extable.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
fb.h arch/sh: Implement <asm/fb.h> with generic helpers 2023-04-20 10:05:08 +02:00
fixmap.h sh/highmem: Remove all traces of unused cruft 2020-11-06 23:14:54 +01:00
flat.h
fpu.h kill unused dump_fpu() instances 2020-07-27 14:33:10 -04:00
freq.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
ftrace.h
futex-cas.h
futex-irq.h
futex-llsc.h
futex.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
hardirq.h sh: irqstat: Use the generic irq_cpustat_t 2020-11-23 10:31:06 +01:00
hd64461.h sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ 2023-07-13 08:37:53 +02:00
heartbeat.h
hugetlb.h mm: change huge_ptep_clear_flush() to return the original pte 2022-05-13 16:48:55 -07:00
hw_breakpoint.h perf/hw_breakpoint: Optimize constant number of breakpoint slots 2022-08-30 10:56:22 +02:00
hw_irq.h
i2c-sh7760.h
io.h sh: machvec: Remove custom ioport_{un,}map() 2023-10-25 16:50:30 +02:00
io_generic.h
io_noioport.h sh: add <asm-generic/io.h> including 2023-08-18 10:12:34 -07:00
io_trapped.h
irq.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
irqflags.h
kdebug.h Revert "sh: add loglvl to printk_address()" 2020-08-14 22:05:07 -04:00
kexec.h
kgdb.h
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
linkage.h
machvec.h sh: machvec: Remove custom ioport_{un,}map() 2023-10-25 16:50:30 +02:00
mmiowb.h
mmu.h
mmu_context.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmu_context_32.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmzone.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
page.h sh: move the ARCH_DMA_MINALIGN definition to asm/cache.h 2023-06-19 16:19:24 -07:00
pci.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
perf_event.h
pgalloc.h sh: convert pte_free_tlb() to use ptdescs 2023-08-21 13:37:57 -07:00
pgtable-2level.h sh: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
pgtable-3level.h sh/mm: Fix pmd_t for real 2023-01-10 05:31:42 -06:00
pgtable.h sh: implement the new page table range API 2023-08-24 16:20:23 -07:00
pgtable_32.h Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
platform_early.h
posix_types.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
processor.h sh/cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:16:00 +02:00
processor_32.h sh: sanitize the flags on sigreturn 2023-03-09 10:01:59 -08:00
ptrace.h
ptrace_32.h
push-switch.h
reboot.h
romimage-macros.h
rtc.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
seccomp.h sh: Enable seccomp architecture tracking 2020-11-20 11:16:35 -08:00
sections.h sh: machvec: Use char[] for section boundaries 2022-09-13 10:33:17 -07:00
setup.h
sfp-machine.h sh: define __BIG_ENDIAN for math-emu 2021-10-27 16:51:24 -04:00
sh7760fb.h
sh_bios.h
shmparam.h
siu.h
smc37c93x.h arch: sh: smc37c93x: fix spelling mistake 2020-08-14 22:05:05 -04:00
smp-ops.h sh/cpu: Mark play_dead() __noreturn 2023-03-08 08:44:24 -08:00
smp.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparsemem.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
spi.h
spinlock-cas.h
spinlock-llsc.h
spinlock.h
spinlock_types.h locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h 2021-12-07 15:14:12 +01:00
sram.h
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
string.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
string_32.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
suspend.h
switch_to.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
switch_to_32.h
syscall.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
syscall_32.h arch: remove unused function syscall_set_arguments() 2021-09-14 16:06:20 +02:00
syscalls.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
syscalls_32.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
thread_info.h thread_info: move function declarations to linux/thread_info.h 2023-06-09 17:44:16 -07:00
timex.h
tlb.h arch/sh/include/asm/tlb.h: remove duplicate include 2021-04-30 11:20:35 -07:00
tlbflush.h
topology.h
traps.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
traps_32.h
types.h sh: Replace <uapi/asm/types.h> by <asm-generic/int-ll64.h> 2023-04-25 09:16:51 +02:00
uaccess.h sh: remove CONFIG_SET_FS support 2022-02-25 09:36:06 +01:00
uaccess_32.h sh: Implement __get_user_u64() required for 64-bit get_user() 2020-08-14 22:05:04 -04:00
uncached.h
unistd.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
unwinder.h
user.h asm/user.h: killed unused macros 2022-01-30 21:17:00 -05:00
vermagic.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
vga.h
vmalloc.h
vmlinux.lds.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
watchdog.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
word-at-a-time.h