summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2017-05-27 06:23:49 +0000
committervisa <visa@openbsd.org>2017-05-27 06:23:49 +0000
commit3c18c7d0435c3dd8b6cc93ab3a831d95014fe459 (patch)
tree1b9c1923bf249ac77cadfba3541c007814e51c7d
parentadd missing prototype (diff)
downloadwireguard-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.
-rw-r--r--sys/arch/mips64/mips64/pmap.c6
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