Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86 Make "pmaps" (list of non-kernel pmaps) and "pm...



details:   https://anonhg.NetBSD.org/src/rev/29a56d50ffc7
branches:  trunk
changeset: 770486:29a56d50ffc7
user:      jym <jym%NetBSD.org@localhost>
date:      Tue Oct 18 23:14:28 2011 +0000

description:
Make "pmaps" (list of non-kernel pmaps) and "pmaps_lock" externally
visible. Required by pmap MD code that could reside in other
files, notably Xen's pmap.

diffstat:

 sys/arch/x86/include/pmap.h |  10 +++++++++-
 sys/arch/x86/x86/pmap.c     |  13 ++++---------
 2 files changed, 13 insertions(+), 10 deletions(-)

diffs (72 lines):

diff -r a8ee467b67b6 -r 29a56d50ffc7 sys/arch/x86/include/pmap.h
--- a/sys/arch/x86/include/pmap.h       Tue Oct 18 23:05:17 2011 +0000
+++ b/sys/arch/x86/include/pmap.h       Tue Oct 18 23:14:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.42 2011/09/20 00:12:23 jym Exp $    */
+/*     $NetBSD: pmap.h,v 1.43 2011/10/18 23:14:28 jym Exp $    */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -119,6 +119,12 @@
 LIST_HEAD(pmap_head, pmap); /* struct pmap_head: head of a pmap list */
 
 /*
+ * linked list of all non-kernel pmaps
+ */
+extern struct pmap_head pmaps;
+extern kmutex_t pmaps_lock;    /* protects pmaps */
+
+/*
  * the pmap structure
  *
  * note that the pm_obj contains the lock pointer, the reference count,
@@ -245,6 +251,8 @@
 
 bool           pmap_is_curpmap(struct pmap *);
 
+void           pmap_invalidate_pool_caches(void);
+
 vaddr_t reserve_dumppages(vaddr_t); /* XXX: not a pmap fn */
 
 typedef enum tlbwhy {
diff -r a8ee467b67b6 -r 29a56d50ffc7 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Tue Oct 18 23:05:17 2011 +0000
+++ b/sys/arch/x86/x86/pmap.c   Tue Oct 18 23:14:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.135 2011/10/11 23:53:31 yamt Exp $  */
+/*     $NetBSD: pmap.c,v 1.136 2011/10/18 23:14:28 jym 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.135 2011/10/11 23:53:31 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.136 2011/10/18 23:14:28 jym Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -325,7 +325,8 @@
 
 long nkptp[] = NKPTP_INITIALIZER;
 
-static kmutex_t pmaps_lock;
+struct pmap_head pmaps;
+kmutex_t pmaps_lock;
 
 static vaddr_t pmap_maxkvaddr;
 
@@ -481,12 +482,6 @@
 static vaddr_t virtual_end __read_mostly;      /* VA of last free KVA */
 
 /*
- * linked list of all non-kernel pmaps
- */
-
-static struct pmap_head pmaps;
-
-/*
  * pool that pmap structures are allocated from
  */
 



Home | Main Index | Thread Index | Old Index