linux/arch/csky/abiv2
Guo Ren 1362d15ffb csky: pgtable: Invalidate stale I-cache lines in update_mmu_cache
The final icache_flush was in the update_mmu_cache, and update_mmu_cache
is after the set_pte_at. Thus, when CPU0 sets the pte,  the other CPU
would see it before the icache_flush broadcast happens, and their
icaches may have cached stale VIPT cache lines in their I-caches. When
address translation was ready for the new cache line, they will use the
stale data of icache, not the fresh one of the dcache.

The csky instruction cache is VIPT, and it needs an origin virtual
address to invalidate the virtual address index entries of cache ways.
The current implementation uses a temporary mapping mechanism -
kmap_atomic, which returns a new virtual address for invalidation. But,
the original virtual address cache line may still in the I-cache.

So force invalidation I-cache in update_mmu_cache, and prevent
flush_dcache when there is an EXEC page. This bug was detected in the
4*c860 SMP system, and this patch could pass the stress test.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
2023-08-10 22:09:25 -04:00
..
inc/abi csky/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2023-02-02 22:33:06 -08:00
cacheflush.c csky: pgtable: Invalidate stale I-cache lines in update_mmu_cache 2023-08-10 22:09:25 -04:00
fpu.c csky: Fixup init_fpu compile warning with __init 2020-03-08 20:55:14 +08:00
Makefile csky: Add C based string functions 2022-04-18 21:23:55 +08:00
mcount.S csky: Fixup kprobes handler couldn't change pc 2020-07-31 01:51:57 +00:00
memcmp.S csky: Library functions 2018-10-26 00:54:24 +08:00
memcpy.S csky: fixup remove vdsp implement for kernel. 2018-12-31 22:56:59 +08:00
memmove.S csky: Fixup vdsp&fpu issues in kernel 2019-04-22 13:44:57 +08:00
memset.S csky: Library functions 2018-10-26 00:54:24 +08:00
strcmp.S csky: Library functions 2018-10-26 00:54:24 +08:00
strcpy.S csky: Library functions 2018-10-26 00:54:24 +08:00
strksyms.c csky: Add C based string functions 2022-04-18 21:23:55 +08:00
strlen.S csky: Library functions 2018-10-26 00:54:24 +08:00
sysdep.h csky: Fixup compile error 2021-02-27 22:04:14 +08:00