From c439c14d72994e77534232c1f470636658c0c8c1 Mon Sep 17 00:00:00 2001 From: Nick Hudson Date: Thu, 11 Nov 2021 07:17:21 +0000 Subject: [PATCH 2/9] Flush a VIVT cache on pmap_activate --- sys/arch/mips/include/pmap.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/mips/include/pmap.h b/sys/arch/mips/include/pmap.h index e544bc5e8301..a91ceb0fe041 100644 --- a/sys/arch/mips/include/pmap.h +++ b/sys/arch/mips/include/pmap.h @@ -145,8 +145,11 @@ pmap_md_cache_prefer_mask(void) static inline void pmap_md_xtab_activate(struct pmap *pm, struct lwp *l) { + const struct mips_cache_info * const mci = &mips_cache_info; + + if (mci->mci_picache_vivt) + mips_icache_sync_all(); - /* nothing */ } static inline void -- 2.25.1