diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-19 23:12:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-19 23:12:23 +0000 |
commit | c9c2f47fceb020c00460282d6dd42fdde77b2ede (patch) | |
tree | 3aa27385351909ac59fecf734b919c6fc84abf31 | |
parent | e505824b089e8503e861bc2c1544de84d6713f46 (diff) |
In pmap_changebit(), do not flush tlb entries unless really necessary.
-rw-r--r-- | sys/arch/mvme88k/mvme88k/pmap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c index 2f65d0f4a12..07e090ec2ef 100644 --- a/sys/arch/mvme88k/mvme88k/pmap.c +++ b/sys/arch/mvme88k/mvme88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.75 2003/09/16 20:52:22 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.76 2003/09/19 23:12:22 miod Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -2593,7 +2593,7 @@ void pmap_changebit(struct vm_page *pg, int set, int mask) { pv_entry_t pvl, pvep; - pt_entry_t *pte, npte; + pt_entry_t *pte, npte, opte; pmap_t pmap; int spl; vaddr_t va; @@ -2651,8 +2651,8 @@ changebit_Retry: /* * Update bits */ - *pte = invalidate_pte(pte); - npte = (*pte | set) & mask; + opte = invalidate_pte(pte); + npte = (opte | set) & mask; /* * Flush TLB of which cpus using pmap. @@ -2660,8 +2660,8 @@ changebit_Retry: * Invalidate pte temporarily to avoid the modified bit * and/or the reference being written back by any other cpu. */ - if (npte != *pte) { - *pte = npte; + *pte = npte; + if (npte != opte) { flush_atc_entry(users, va, kflush); } |