linux-stable/arch/mips/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
..
dec MIPS: dec: prom: Address -Warray-bounds warning 2023-06-23 15:00:29 +02:00
fw add intptr_t 2023-06-09 17:44:13 -07:00
ip32
mach-ath25 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ath79 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-au1x00 gpiolib: remove unused gpio_cansleep() 2023-06-13 16:49:23 +02:00
mach-bcm47xx MIPS: BCM47XX: Add support for Huawei B593u-12 2023-03-14 17:05:14 +01:00
mach-bcm63xx PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
mach-bmips MIPS: cleanup fixup_bigphys_addr handling 2020-04-19 16:09:44 +02:00
mach-cavium-octeon locking: remove spin_lock_prefetch 2023-08-12 09:18:47 -07:00
mach-cobalt MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-db1x00
mach-dec MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-generic MIPS: Remove no longer used ide.h 2023-04-05 10:08:51 +02:00
mach-ingenic MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ip22 MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-ip27 MIPS: IP27: Remove incorrect `cpu_has_fpu' override 2022-05-04 22:23:14 +02:00
mach-ip28 MIPS: SGI-IP28: disable use of ll/sc in kernel 2020-10-08 10:33:27 +02:00
mach-ip30 MIPS: IP30: Remove incorrect `cpu_has_fpu' override 2022-05-04 22:23:18 +02:00
mach-ip32 MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-jazz mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mach-lantiq MIPS: lantiq: remove unused function declaration 2023-04-05 10:21:06 +02:00
mach-loongson2ef MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-loongson32 MIPS: loongson32: Remove dma.h and nand.h 2023-10-06 10:10:13 +02:00
mach-loongson64 irqchip/loongson-liointc: Add ACPI init support 2022-07-20 12:09:21 +01:00
mach-malta MIPS: malta: remove mach-malta/malta-dtshim.h header file 2020-09-21 22:16:47 +02:00
mach-n64 mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
mach-pic32 MIPS: Add header files reference with path prefix 2020-03-19 13:12:27 +01:00
mach-ralink mips: ralink: mt7620: remove clock related code 2023-06-21 14:50:23 +02:00
mach-rc32434 MIPS: Fix a compilation issue 2023-01-27 17:22:06 +01:00
mach-rm MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-sibyte MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-tx49xx MIPS: TXX9: Remove rbtx4939 board support 2022-01-02 14:10:40 +01:00
mips-boards MIPS: launch.h: add include guard to prevent build errors 2021-05-25 15:18:59 +02:00
octeon staging: octeon: cvmx_ptr_to_phys() should return physaddr_t 2022-11-02 08:21:49 +01:00
pci MIPS: PCI: Support mapping of INTB/C/D for pci-xtalk-bridge 2020-01-09 15:30:53 -08:00
sgi MIPS: SGI-IP30: Move irq bits to better header files 2020-09-21 22:15:49 +02:00
sibyte MIPS: sibyte: Remove Sibyte CARMEL and CRHINE board support 2023-03-17 10:27:21 +01:00
sn MIPS: remove define-only GDA_MAGIC, previously magic number 2022-09-24 14:17:18 +02:00
txx9 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
vdso MIPS: vdso: Invalid GIC access through VDSO 2021-07-09 15:29:06 +02:00
xtalk
Kbuild mips: remove <asm/export.h> 2023-08-15 10:22:23 +02:00
abi.h
addrspace.h MIPS: Remove unused R8000 CPU support 2019-07-23 14:33:51 -07:00
amon.h
arch_hweight.h
asm-eva.h MIPS: Fix typo for user_ld macro definition 2020-04-16 17:30:16 +02:00
asm-offsets.h
asm-prototypes.h MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu 2022-12-01 11:46:05 +01:00
asm.h MIPS: Workaround clang inline compat branch issue 2023-02-28 23:09:49 +01:00
asmmacro-32.h MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
asmmacro-64.h
asmmacro.h MIPS: Drop unused positional parameter in local_irq_{dis,en}able 2023-04-05 10:20:00 +02:00
atomic.h locking/atomic: make atomic*_{cmp,}xchg optional 2023-06-05 09:57:14 +02:00
barrier.h MIPS: barrier: Make __smp_mb__before_atomic() a no-op for Loongson3 2019-10-07 09:43:08 -07:00
bcache.h
bitops.h mm: delete checks for xor_unlock_is_negative_byte() 2023-10-18 14:34:17 -07:00
bitrev.h
bmips-spaces.h
bmips.h MIPS: bmips: mark exception vectors as char arrays 2019-10-23 21:07:28 -07:00
bootinfo.h MIPS: Ingenic: Add system type for new Ingenic SoCs. 2021-07-19 13:16:42 +02:00
branch.h MIPS: Fix the declaration conflict of mm_isBranchInstr() 2020-04-24 18:17:44 +02:00
break.h
bug.h
bugs.h mips/cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:16:00 +02:00
cache.h MIPS: Move declaration of bcache ops to cache.c 2023-04-05 09:45:08 +02:00
cacheflush.h mm: Introduce flush_cache_vmap_early() 2023-12-14 00:23:17 -08:00
cacheops.h MIPS: Rename the "Fill" cache ops to avoid build failure 2020-04-26 15:40:50 +02:00
cdmm.h
cevt-r4k.h
checksum.h MIPS: Rewrite `csum_tcpudp_nofold' in plain C 2022-05-23 11:29:59 +02:00
clocksource.h mips: Introduce asm/vdso/clocksource.h 2020-03-21 15:23:55 +01:00
cmp.h
cmpxchg.h locking/arch: Rename all internal __xchg() names to __arch_xchg() 2023-04-29 09:08:44 +02:00
compat-signal.h
compat.h asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
compiler.h MIPS: remove GCC < 4.9 support 2020-11-11 23:49:22 +01:00
cop2.h MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
cpu-features.h MIPS: cpu-features: Use boot_cpu_type for CPU type based features 2023-06-09 09:56:22 +02:00
cpu-info.h MIPS: emulate CPUCFG instruction on older Loongson64 cores 2020-05-24 09:26:55 +02:00
cpu-type.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
cpu.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
cpufeature.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
delay.h
div64.h MIPS: Avoid handcoded DIVU in `__div64_32' altogether 2021-04-23 13:40:31 +02:00
dma-direct.h dma-direct: rename and cleanup __phys_to_dma 2020-09-11 09:14:43 +02:00
dma-mapping.h dma-mapping: no need to pass a bus_type into get_arch_dma_ops() 2023-02-15 12:35:20 +01:00
dma.h PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dmi.h MIPS: Add support for Desktop Management Interface (DMI) 2020-03-23 15:44:05 +01:00
ds1287.h
dsemul.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dsp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
edac.h
elf.h mips compat: switch to compat_binfmt_elf.c 2021-01-06 08:42:49 -05:00
elfcore-compat.h mips compat: switch to compat_binfmt_elf.c 2021-01-06 08:42:49 -05:00
errno.h
eva.h
exec.h
extable.h
fb.h fbdev: Replace fb_pgprotect() with pgprot_framebuffer() 2023-10-12 09:20:46 +02:00
fixmap.h mips: fix comment about pgtable_init() 2023-04-05 19:42:52 -07:00
floppy.h
fpregdef.h MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
fpu.h MIPS: Fix unreachable code issue 2021-07-13 15:08:15 -05:00
fpu_emulator.h MIPS: Fix the declaration conflict of mm_isBranchInstr() 2020-04-24 18:17:44 +02:00
ftrace.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
futex.h MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
ginvt.h MIPS: Avoid macro redefinitions 2021-09-23 11:23:35 +02:00
gio_device.h MIPS: ip22-gio: Make gio_match_device() static 2020-01-13 10:55:40 -08:00
gt64120.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
hardirq.h
hazards.h MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
highmem.h MIPS: Fix PKMAP with 32-bit MIPS huge page support 2021-06-30 14:41:32 +02:00
hpet.h
hugetlb.h mm: change huge_ptep_clear_flush() to return the original pte 2022-05-13 16:48:55 -07:00
hw_irq.h
i8259.h irqchip: Add driver for Loongson-3 HyperTransport PIC controller 2020-03-25 10:56:43 +01:00
idle.h MIPS: idle: Add prototype for function check_wait 2020-09-27 13:00:45 +02:00
inst.h MIPS: Make definitions of MIPSInst_FMA_{FUNC,FMTM} consistent with MIPS64 manual 2021-01-22 11:45:52 +01:00
io.h asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros 2023-08-18 10:12:32 -07:00
irq.h nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
irq_cpu.h MIPS: Kill RM7K & RM9K IRQ Code 2021-01-04 11:37:27 +01:00
irq_gt641xx.h
irq_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irqflags.h mips: Implement arch_irqs_disabled() 2020-08-26 12:41:55 +02:00
isa-rev.h
isadep.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
jazz.h
jazzdma.h MIPS/jazzdma: remove the unused vdma_remap function 2020-09-11 08:13:49 +02:00
jump_label.h jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kdebug.h
kexec.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
kgdb.h mips: kgdb: adjust the comment to the actual ifdef condition 2021-12-16 15:47:58 +01:00
kprobes.h kprobes: unify kprobes_exceptions_nofify() prototypes 2023-11-10 19:59:05 +09:00
kvm_host.h KVM: Declare kvm_arch_flush_remote_tlbs() globally 2023-08-17 09:35:14 +01:00
kvm_types.h KVM: MIPS: Use common KVM implementation of MMU memory caches 2020-07-09 13:29:44 -04:00
linkage.h
local.h locking/local, arch: Rewrite local_add_unless() as a static inline function 2023-10-04 11:38:11 +02:00
maar.h mips: MAAR: Add XPA mode support 2020-05-19 17:39:32 +02:00
machine.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
mc146818-time.h
mc146818rtc.h
mips-cm.h mips: cm: Convert to bitfield API to fix out-of-bounds access 2021-11-02 10:53:52 +01:00
mips-cpc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mips-cps.h MIPS: CPS: Use bitfield helpers 2021-11-29 12:43:06 +01:00
mips-gic.h Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-06-29 19:36:53 +08:00
mips-r2-to-r6-emul.h
mips_mt.h
mipsmtregs.h MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
mipsprom.h
mipsregs.h MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
mmiowb.h
mmu.h
mmu_context.h mips: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:36 +01:00
mmzone.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
module.h mips: Add MIPS Warrior P5600 support 2020-05-22 09:10:53 +02:00
msa.h MIPS: Avoid macro redefinitions 2021-09-23 11:23:35 +02:00
msc01_ic.h
paccess.h
page.h mm, arch: add generic implementation of pfn_valid() for FLATMEM 2023-02-09 16:51:41 -08: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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pgalloc.h mm: add statistics for PUD level pagetable 2023-10-06 14:44:10 -07:00
pgtable-32.h mips: implement the new page table range API 2023-08-24 16:20:22 -07:00
pgtable-64.h mips: implement the new page table range API 2023-08-24 16:20:22 -07:00
pgtable-bits.h mips: implement the new page table range API 2023-08-24 16:20:22 -07:00
pgtable.h Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
pm-cps.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
prefetch.h
processor.h MIPS: Octeon: Allow CVMSEG to be disabled 2023-04-05 09:45:09 +02:00
prom.h MIPS: Fix wrong comments in asm/prom.h 2022-03-14 15:09:27 +01:00
ptrace.h Revert "MIPS: Add basic support for ptrace single step" 2021-02-18 11:57:44 +01:00
r4k-timer.h MIPS: Correct the header guard of r4k-timer.h 2020-09-18 15:29:00 +02:00
r4kcache.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
reboot.h
reg.h
regdef.h
rtlx.h MIPS: Remove deprecated CONFIG_MIPS_CMP 2023-04-12 15:01:09 +02:00
seccomp.h seccomp: Use -1 marker for end of mode 1 syscall list 2020-07-10 16:01:52 -07:00
setup.h MIPS: fix fortify panic when copying asm exception handlers 2022-03-07 13:09:28 +01:00
sgialib.h MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline 2019-10-23 21:10:34 -07:00
sgiarcs.h MIPS: fw: arc: use call_o32 to call ARC prom from 64bit kernel 2019-10-09 14:55:51 -07:00
shmparam.h
sigcontext.h
signal.h
sim.h
smp-cps.h MIPS: smp-cps: Don't rely on CP0_CMGCRBASE 2023-02-27 23:44:57 +01:00
smp-ops.h MIPS: SMP_CPS: Switch to hotplug core state synchronization 2023-05-15 13:44:58 +02:00
smp.h MIPS: Rework smt cmdline parameters 2023-06-09 10:34:14 +02:00
sni.h MIPS: remove orphan sni_cpu_time_init() declaration 2022-09-19 16:36:55 +02:00
socket.h
sparsemem.h
spinlock.h locking/arch: Move qrwlock.h include after qspinlock.h 2021-02-11 07:59:54 -05:00
spinlock_types.h
spram.h MIPS: asm: spram: remove unneeded semicolon 2021-01-27 21:50:22 +01:00
stackframe.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h
string.h MIPS: Drop 32-bit asm string functions 2019-10-09 12:48:05 -07:00
switch_to.h MIPS: context switch: Use save/restore instead of set/clear for Status.CU2 2020-09-21 22:14:47 +02:00
sync.h MIPS: cavium_octeon: Fix syncw generation. 2020-02-15 12:44:03 -08:00
syscall.h mips: fix syscall_get_nr 2023-02-19 09:28:30 +01:00
thread_info.h MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00
time.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timex.h mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-13 23:59:23 +02:00
tlb.h
tlbdebug.h
tlbex.h
tlbflush.h
tlbmisc.h
topology.h
traps.h MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
txx9irq.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
txx9pio.h
txx9tmr.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
types.h mips: Remove #include <uapi/asm/types.h> from <asm/types.h> 2020-11-11 23:45:46 +01:00
uaccess.h uaccess: generalize access_ok() 2022-02-25 09:36:05 +01:00
uasm.h mips, uasm: Add workaround for Loongson-2F nop CPU errata 2021-10-06 12:28:09 -07:00
unaligned-emul.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
unistd.h fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT 2022-04-26 13:35:45 -07:00
unroll.h treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
uprobes.h
vdso.h mips: Add support for generic vDSO 2019-07-25 21:45:05 -07:00
vermagic.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
vga.h
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vpe.h MIPS: Remove deprecated CONFIG_MIPS_CMP 2023-04-12 15:01:09 +02:00
watch.h
wbflush.h
yamon-dt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00