From 101534f662a7ba575f17e8138b5591406bfba35e Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 26 Dec 2003 18:54:25 +0000 Subject: A simple compile-time micro-optimization in pmap_protect() for non-hp300 flavours. --- sys/arch/m68k/m68k/pmap_motorola.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/arch/m68k') diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index 1f345cb1735..f8f5f79ba23 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.31 2003/12/14 19:06:59 miod Exp $ */ +/* $OpenBSD: pmap_motorola.c,v 1.32 2003/12/26 18:54:24 miod Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -872,8 +872,11 @@ pmap_protect(pmap, sva, eva, prot) { vaddr_t nssva; pt_entry_t *pte; - boolean_t firstpage, needtflush; + boolean_t needtflush; int isro; +#ifdef M68K_MMU_HP + boolean_t firstpage; +#endif PMAP_DPRINTF(PDB_FOLLOW|PDB_PROTECT, ("pmap_protect(%p, %lx, %lx, %x)\n", @@ -886,7 +889,9 @@ pmap_protect(pmap, sva, eva, prot) isro = pte_prot(prot); needtflush = active_pmap(pmap); +#ifdef M68K_MMU_HP firstpage = TRUE; +#endif while (sva < eva) { nssva = m68k_trunc_seg(sva) + NBSEG; if (nssva == 0 || nssva > eva) @@ -933,7 +938,9 @@ pmap_protect(pmap, sva, eva, prot) pmap_pte_set_prot(pte, isro); if (needtflush) TBIS(sva); +#ifdef M68K_MMU_HP firstpage = FALSE; +#endif } pte++; sva += PAGE_SIZE; -- cgit v1.2.3