diff options
author | 2018-05-09 14:28:36 +0000 | |
---|---|---|
committer | 2018-05-09 14:28:36 +0000 | |
commit | 4399dfe917ae68fcfbf16b5ecb57da4b8d6cb86c (patch) | |
tree | 707a722b82bdaa28149a246007b2c9c175a72f6d | |
parent | As required by IF-MIB, cap ifSpeed at UINT32_MAX; the value is a GAUGE32 so (diff) | |
download | wireguard-openbsd-4399dfe917ae68fcfbf16b5ecb57da4b8d6cb86c.tar.xz wireguard-openbsd-4399dfe917ae68fcfbf16b5ecb57da4b8d6cb86c.zip |
vm_page lookup does not need locking. Hoist it outside the pmap lock.
-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 7ff4988bd27..62d9fdec983 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.108 2018/01/06 06:30:11 visa Exp $ */ +/* $OpenBSD: pmap.c,v 1.109 2018/05/09 14:28:36 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -1030,6 +1030,8 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) ("pmap_enter(%p, %p, %p, 0x%x, 0x%x)\n", pmap, (void *)va, (void *)pa, prot, flags)); + pg = PHYS_TO_VM_PAGE(pa); + pmap_lock(pmap); #ifdef DIAGNOSTIC @@ -1045,8 +1047,6 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) } #endif - pg = PHYS_TO_VM_PAGE(pa); - if (pg != NULL) { mtx_enter(&pg->mdpage.pv_mtx); |