diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2023-07-12 17:03:20 +0300 |
---|---|---|
committer | Guo Ren <guoren@linux.alibaba.com> | 2023-08-11 05:09:25 +0300 |
commit | 1362d15ffb59db65b2df354b548b7915686cb05c (patch) | |
tree | ab0fdfa57a573a2c61ecf0a8d2e291f3978d5b09 /arch/arc | |
parent | 57427df33d5f4281e5b71d4e9afddacdbc622b86 (diff) | |
download | linux-1362d15ffb59db65b2df354b548b7915686cb05c.tar.xz |
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>
Diffstat (limited to 'arch/arc')
0 files changed, 0 insertions, 0 deletions