Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/uvm If both __HAVE_PMAP_PHYSSEG and __HAVE_PMAP_P...
details: https://anonhg.NetBSD.org/src/rev/c6bf1093e5c0
branches: uebayasi-xip
changeset: 751759:c6bf1093e5c0
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Wed Aug 11 13:14:55 2010 +0000
description:
If both __HAVE_PMAP_PHYSSEG and __HAVE_PMAP_PHYSSEG_INIT is defined,
call per-vm_physseg initialization/finalization hooks.
diffstat:
sys/uvm/uvm_page.c | 18 ++++++++++++++++--
sys/uvm/uvm_pmap.h | 10 +++++++++-
2 files changed, 25 insertions(+), 3 deletions(-)
diffs (70 lines):
diff -r af2f2e60f5e0 -r c6bf1093e5c0 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c Wed Aug 11 09:50:01 2010 +0000
+++ b/sys/uvm/uvm_page.c Wed Aug 11 13:14:55 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.c,v 1.153.2.52 2010/08/11 09:50:01 uebayasi Exp $ */
+/* $NetBSD: uvm_page.c,v 1.153.2.53 2010/08/11 13:14:55 uebayasi Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.52 2010/08/11 09:50:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.153.2.53 2010/08/11 13:14:55 uebayasi Exp $");
#include "opt_ddb.h"
#include "opt_uvmhist.h"
@@ -873,6 +873,14 @@
#endif
}
+ KASSERT(uvm_physseg_inited);
+
+#ifdef __HAVE_PMAP_PHYSSEG
+#ifdef __HAVE_PMAP_PHYSSEG_INIT
+ pmap_physseg_init(seg);
+#endif
+#endif
+
vm_nphysdev++;
return seg;
}
@@ -882,6 +890,12 @@
{
struct vm_physseg *seg = cookie;
+#ifdef __HAVE_PMAP_PHYSSEG
+#ifdef __HAVE_PMAP_PHYSSEG_INIT
+ pmap_physseg_fini(seg);
+#endif
+#endif
+
kmem_free(seg->pgs, sizeof(struct vm_page) * (seg->end - seg->start));
uvm_physseg_free(&vm_physdev_freelist, vm_physdev_ptrs, seg);
vm_nphysdev--;
diff -r af2f2e60f5e0 -r c6bf1093e5c0 sys/uvm/uvm_pmap.h
--- a/sys/uvm/uvm_pmap.h Wed Aug 11 09:50:01 2010 +0000
+++ b/sys/uvm/uvm_pmap.h Wed Aug 11 13:14:55 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pmap.h,v 1.32.2.2 2010/04/27 07:17:25 uebayasi Exp $ */
+/* $NetBSD: uvm_pmap.h,v 1.32.2.3 2010/08/11 13:14:55 uebayasi Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -185,6 +185,14 @@
#if defined(PMAP_FORK)
void pmap_fork(pmap_t, pmap_t);
#endif
+
+#if defined(__HAVE_PMAP_PHYSSEG)
+#if defined(__HAVE_PMAP_PHYSSEG_INIT)
+struct vm_physseg;
+void pmap_physseg_init(struct vm_physseg *);
+void pmap_physseg_fini(struct vm_physseg *);
+#endif
+#endif
__END_DECLS
#endif /* kernel*/
#endif /* PMAP_EXCLUDE_DECLS */
Home |
Main Index |
Thread Index |
Old Index