Fix:Always use vmalle1is for kernel aspace; only use aside1is for user aspace with non-global PTE.

This commit is contained in:
run.mao
2026-06-26 17:54:38 +08:00
committed by Rbb666
parent caca34c377
commit 187dc3fddf
+12 -8
View File
@@ -51,14 +51,18 @@ static inline void rt_hw_tlb_invalidate_all_local(void)
static inline void rt_hw_tlb_invalidate_aspace(rt_aspace_t aspace)
{
#ifdef ARCH_USING_ASID
__asm__ volatile(
// ensure updates to pte completed
"dsb nshst\n"
"tlbi aside1is, %0\n"
"dsb nsh\n"
// after tlb in new context, refresh inst
"isb\n" ::"r"(TLBI_ARG(0ul, aspace->asid))
: "memory");
if (aspace == &rt_kernel_space) {
rt_hw_tlb_invalidate_all();
} else {
__asm__ volatile(
// ensure updates to pte completed
"dsb ishst\n"
"tlbi aside1is, %0\n"
"dsb ish\n"
// after tlb in new context, refresh inst
"isb\n" ::"r"(TLBI_ARG(0ul, aspace->asid))
: "memory");
}
#else
rt_hw_tlb_invalidate_all();
#endif