Module Name: src Committed By: jym Date: Tue Oct 18 23:14:28 UTC 2011
Modified Files: src/sys/arch/x86/include: pmap.h src/sys/arch/x86/x86: pmap.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/include/pmap.h cvs rdiff -u -r1.135 -r1.136 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/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.42 src/sys/arch/x86/include/pmap.h:1.43 --- src/sys/arch/x86/include/pmap.h:1.42 Tue Sep 20 00:12:23 2011 +++ src/sys/arch/x86/include/pmap.h Tue Oct 18 23:14:28 2011 @@ -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 @@ u_int x86_mmap_flags(paddr_t); 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 { Index: src/sys/arch/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.135 src/sys/arch/x86/x86/pmap.c:1.136 --- src/sys/arch/x86/x86/pmap.c:1.135 Tue Oct 11 23:53:31 2011 +++ src/sys/arch/x86/x86/pmap.c Tue Oct 18 23:14:28 2011 @@ -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 @@ pd_entry_t * const normal_pdes[] = PDES_ 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_avail __read_most 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 */