From 5bf95247910fc5b8f121c4362e91ebdc89cbbedc Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 16 Dec 2001 23:06:05 +0000 Subject: Delay a cache invalidation in a 68060-only loop. Also, better tests for validity bits in STEs. --- sys/arch/m68k/m68k/pmap_motorola.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index a30e82688f5..06058c3d402 100644 --- a/sys/arch/m68k/m68k/pmap_motorola.c +++ b/sys/arch/m68k/m68k/pmap_motorola.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.c,v 1.12 2001/12/16 21:48:48 miod Exp $ */ +/* $OpenBSD: pmap_motorola.c,v 1.13 2001/12/16 23:06:04 miod Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -529,10 +529,13 @@ pmap_init() pte = pmap_pte(pmap_kernel(), addr2); *pte = (*pte | PG_CI) & ~PG_CCB; TBIS(addr2); - DCIS(); } #endif } while (addr != addr2); +#ifdef M68060 + if (mmutype == MMU_68060) + DCIS(); +#endif PMAP_DPRINTF(PDB_INIT, ("pmap_init: KPT: %ld pages from %lx to %lx\n", atop(s), addr, addr + s)); @@ -1881,11 +1884,11 @@ ok: if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT)) pmapdebug = opmapdebug; - if (*ste != SG_NV) + if (!(*ste & SG_V)) printf("collect: kernel STE at %p still valid (%x)\n", ste, *ste); ste = &Sysptmap[ste - pmap_ste(pmap_kernel(), 0)]; - if (*ste != SG_NV) + if (!(*ste & SG_V)) printf("collect: kernel PTmap at %p still valid (%x)\n", ste, *ste); #endif @@ -2152,7 +2155,7 @@ pmap_mapmulti(pmap, va) #endif bste = pmap_ste(pmap, HPMMBASEADDR(va)); ste = pmap_ste(pmap, va); - if (*ste == SG_NV && (*bste & SG_V)) { + if (!(*ste & SG_V) && (*bste & SG_V)) { *ste = *bste; TBIAU(); return (0); -- cgit v1.2.3