Index: sys/arch/mips/mips/pmap_machdep.c =================================================================== RCS file: /cvsroot/src/sys/arch/mips/mips/pmap_machdep.c,v retrieving revision 1.38 diff -u -p -r1.38 pmap_machdep.c --- sys/arch/mips/mips/pmap_machdep.c 26 Oct 2022 07:35:20 -0000 1.38 +++ sys/arch/mips/mips/pmap_machdep.c 12 Jul 2025 06:58:42 -0000 @@ -876,6 +876,18 @@ pmap_md_tlb_check_entry(void *ctx, vaddr } else { xpte &= ~(MIPS1_PG_WIRED|MIPS1_PG_RO); } + /* + * Don't check for differences in the TLB entry modified status for + * kernal mappings as they can be modified while the kernel pmap is + * being updated, see PR59518. + */ + if (pm == pmap_kernel()) { + if (MIPS_HAS_R4K_MMU) { + xpte ^= (pte ^ xpte) & MIPS3_PG_D; + } else { + xpte ^= (pte ^ xpte) & MIPS1_PG_D; + } + } KASSERTMSG(pte == xpte, "pmap=%p va=%#"PRIxVADDR" asid=%u: TLB pte (%#"PRIxPTE