diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2017-05-27 06:23:50 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2017-05-27 06:23:50 +0000 |
commit | f7a081d3baa24783523740201c3a15ba09eeb764 (patch) | |
tree | e97e997b4938fa84236259f929314fbd547f5499 /sys/arch/mips64 | |
parent | edcfc079d1c837edef05dba5aba2b3c6bcbec537 (diff) |
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/arch/mips64')
-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 |