Module Name: src Committed By: maxv Date: Fri Aug 19 18:04:39 UTC 2016
Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Rename new_pve2 -> new_sparepve, makes it less bizarre. To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.218 src/sys/arch/x86/x86/pmap.c:1.219 --- src/sys/arch/x86/x86/pmap.c:1.218 Wed Jul 27 12:08:46 2016 +++ src/sys/arch/x86/x86/pmap.c Fri Aug 19 18:04:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.218 2016/07/27 12:08:46 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.219 2016/08/19 18:04:39 maxv Exp $ */ /*- * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.218 2016/07/27 12:08:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.219 2016/08/19 18:04:39 maxv Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -1757,14 +1757,12 @@ insert_pv(struct pmap_page *pp, struct p * pmap_enter_pv: enter a mapping onto a pv_head lst * * => caller should adjust ptp's wire_count before calling + * => caller has preallocated pve and *sparepve for us */ static struct pv_entry * -pmap_enter_pv(struct pmap_page *pp, - struct pv_entry *pve, /* preallocated pve for us to use */ - struct pv_entry **sparepve, - struct vm_page *ptp, - vaddr_t va) +pmap_enter_pv(struct pmap_page *pp, struct pv_entry *pve, + struct pv_entry **sparepve, struct vm_page *ptp, vaddr_t va) { KASSERT(ptp == NULL || ptp->wire_count >= 2); @@ -3989,7 +3987,7 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t struct pmap_page *new_pp, *old_pp; struct pv_entry *old_pve = NULL; struct pv_entry *new_pve; - struct pv_entry *new_pve2; + struct pv_entry *new_sparepve; int error; bool wired = (flags & PMAP_WIRED) != 0; struct pmap *pmap2; @@ -4046,8 +4044,8 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t /* get pves. */ new_pve = pool_cache_get(&pmap_pv_cache, PR_NOWAIT); - new_pve2 = pool_cache_get(&pmap_pv_cache, PR_NOWAIT); - if (new_pve == NULL || new_pve2 == NULL) { + new_sparepve = pool_cache_get(&pmap_pv_cache, PR_NOWAIT); + if (new_pve == NULL || new_sparepve == NULL) { if (flags & PMAP_CANFAIL) { error = ENOMEM; goto out2; @@ -4153,7 +4151,7 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t */ if (new_pp) { - new_pve = pmap_enter_pv(new_pp, new_pve, &new_pve2, ptp, va); + new_pve = pmap_enter_pv(new_pp, new_pve, &new_sparepve, ptp, va); } same_pa: @@ -4178,8 +4176,8 @@ out2: if (new_pve != NULL) { pool_cache_put(&pmap_pv_cache, new_pve); } - if (new_pve2 != NULL) { - pool_cache_put(&pmap_pv_cache, new_pve2); + if (new_sparepve != NULL) { + pool_cache_put(&pmap_pv_cache, new_sparepve); } return error;