Module Name: src
Committed By: snj
Date: Sun Dec 18 07:02:59 UTC 2016
Modified Files:
src/sys/arch/x86/include [netbsd-7-0]: pmap.h
src/sys/arch/x86/x86 [netbsd-7-0]: pmap.c vm_machdep.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1316):
sys/arch/x86/x86/pmap.c: revision 1.223
sys/arch/x86/x86/vm_machdep.c: revision 1.26
sys/arch/x86/include/pmap.h: revision 1.61
PR/49691: KAMADA Ken'ichi: free deferred ptp mappings if present.
XXX: pullup-7
To generate a diff of this commit:
cvs rdiff -u -r1.55.4.1 -r1.55.4.1.2.1 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.183.2.2.2.1 -r1.183.2.2.2.2 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/arch/x86/x86/vm_machdep.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/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.55.4.1 src/sys/arch/x86/include/pmap.h:1.55.4.1.2.1
--- src/sys/arch/x86/include/pmap.h:1.55.4.1 Thu Apr 23 07:31:16 2015
+++ src/sys/arch/x86/include/pmap.h Sun Dec 18 07:02:59 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.55.4.1 2015/04/23 07:31:16 snj Exp $ */
+/* $NetBSD: pmap.h,v 1.55.4.1.2.1 2016/12/18 07:02:59 snj Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -479,6 +479,7 @@ void pmap_kenter_ma(vaddr_t, paddr_t, vm
int pmap_enter_ma(struct pmap *, vaddr_t, paddr_t, paddr_t,
vm_prot_t, u_int, int);
bool pmap_extract_ma(pmap_t, vaddr_t, paddr_t *);
+void pmap_free_ptps(struct vm_page *);
/*
* Hooks for the pool allocator.
Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.183.2.2.2.1 src/sys/arch/x86/x86/pmap.c:1.183.2.2.2.2
--- src/sys/arch/x86/x86/pmap.c:1.183.2.2.2.1 Fri Feb 26 21:51:54 2016
+++ src/sys/arch/x86/x86/pmap.c Sun Dec 18 07:02:59 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.183.2.2.2.1 2016/02/26 21:51:54 snj Exp $ */
+/* $NetBSD: pmap.c,v 1.183.2.2.2.2 2016/12/18 07:02:59 snj Exp $ */
/*-
* Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.183.2.2.2.1 2016/02/26 21:51:54 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.183.2.2.2.2 2016/12/18 07:02:59 snj Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -2399,7 +2399,7 @@ pmap_create(void)
* pmap_free_ptps: put a list of ptps back to the freelist.
*/
-static void
+void
pmap_free_ptps(struct vm_page *empty_ptps)
{
struct vm_page *ptp;
Index: src/sys/arch/x86/x86/vm_machdep.c
diff -u src/sys/arch/x86/x86/vm_machdep.c:1.25 src/sys/arch/x86/x86/vm_machdep.c:1.25.8.1
--- src/sys/arch/x86/x86/vm_machdep.c:1.25 Tue Mar 11 20:55:19 2014
+++ src/sys/arch/x86/x86/vm_machdep.c Sun Dec 18 07:02:59 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.25 2014/03/11 20:55:19 para Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.25.8.1 2016/12/18 07:02:59 snj Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.25 2014/03/11 20:55:19 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.25.8.1 2016/12/18 07:02:59 snj Exp $");
#include "opt_mtrr.h"
@@ -249,6 +249,12 @@ cpu_lwp_free(struct lwp *l, int proc)
if (proc && l->l_proc->p_md.md_flags & MDP_USEDMTRR)
mtrr_clean(l->l_proc);
#endif
+ /*
+ * Free deferred mappings if any.
+ */
+ struct vm_page *empty_ptps = l->l_md.md_gc_ptp;
+ l->l_md.md_gc_ptp = NULL;
+ pmap_free_ptps(empty_ptps);
}
/*