diff options
author | 2017-05-27 06:23:49 +0000 | |
---|---|---|
committer | 2017-05-27 06:23:49 +0000 | |
commit | 3c18c7d0435c3dd8b6cc93ab3a831d95014fe459 (patch) | |
tree | 1b9c1923bf249ac77cadfba3541c007814e51c7d /sys | |
parent | add missing prototype (diff) | |
download | wireguard-openbsd-3c18c7d0435c3dd8b6cc93ab3a831d95014fe459.tar.xz wireguard-openbsd-3c18c7d0435c3dd8b6cc93ab3a831d95014fe459.zip |
Check cache_valias_mask earlier in the expression. The value is zero
on most systems, so this tweak should save an iota of CPU time.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/pmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index 6b82703f250..3044c96bc24 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.101 2017/01/21 05:42:03 guenther Exp $ */ +/* $OpenBSD: pmap.c,v 1.102 2017/05/27 06:23:49 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -1895,8 +1895,8 @@ pmap_enter_pv(pmap_t pmap, vaddr_t va, vm_page_t pg, pt_entry_t *npte) if (npv == NULL) return ENOMEM; - if ((*npte & PG_CACHED) != 0 && - (pg->pg_flags & PGF_CACHED) != 0 && cache_valias_mask != 0) { + if (cache_valias_mask != 0 && (*npte & PG_CACHED) != 0 && + (pg->pg_flags & PGF_CACHED) != 0) { /* * We have a VAC possibility. Check if virtual * address of current mappings are compatible |