summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-12-26 18:54:25 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-12-26 18:54:25 +0000
commit101534f662a7ba575f17e8138b5591406bfba35e (patch)
treecd6051c49cd3f0a780dd90a667ff7894ffa06d52
parent8df7e50db052f3d9988d01cb19ae565da176d463 (diff)
A simple compile-time micro-optimization in pmap_protect() for
non-hp300 flavours.
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c11
1 files changed, 9 insertions, 2 deletions
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;