Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Move Xen-specific functions to Xen pmap. Requested ...



details:   https://anonhg.NetBSD.org/src/rev/6a0c21960519
branches:  trunk
changeset: 771485:6a0c21960519
user:      jym <jym%NetBSD.org@localhost>
date:      Wed Nov 23 00:56:56 2011 +0000

description:
Move Xen-specific functions to Xen pmap. Requested by cherry@.

Un'ifdef XEN in xen_pmap.c, it is always defined there.

diffstat:

 sys/arch/x86/include/pmap.h    |  12 +-----------
 sys/arch/xen/include/xenpmap.h |   9 ++++++++-
 sys/arch/xen/x86/xen_pmap.c    |   7 +++----
 3 files changed, 12 insertions(+), 16 deletions(-)

diffs (87 lines):

diff -r a3236d9effcd -r 6a0c21960519 sys/arch/x86/include/pmap.h
--- a/sys/arch/x86/include/pmap.h       Tue Nov 22 22:30:22 2011 +0000
+++ b/sys/arch/x86/include/pmap.h       Wed Nov 23 00:56:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.46 2011/11/20 19:41:27 jym Exp $    */
+/*     $NetBSD: pmap.h,v 1.47 2011/11/23 00:56:56 jym Exp $    */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -456,24 +456,14 @@
         splx(s);
 }
 
-
 /* Xen helpers to change bits of a pte */
 #define XPMAP_UPDATE_DIRECT    1       /* Update direct map entry flags too */
 
 paddr_t        vtomach(vaddr_t);
 #define vtomfn(va) (vtomach(va) >> PAGE_SHIFT)
 
-void   pmap_xen_resume(void);
-void   pmap_xen_suspend(void);
-
 void   pmap_apte_flush(struct pmap *);
 void   pmap_unmap_apdp(void);
-
-#ifdef PAE
-void   pmap_map_recursive_entries(void);
-void   pmap_unmap_recursive_entries(void);
-#endif /* PAE */
-
 #endif /* XEN */
 
 /* pmap functions with machine addresses */
diff -r a3236d9effcd -r 6a0c21960519 sys/arch/xen/include/xenpmap.h
--- a/sys/arch/xen/include/xenpmap.h    Tue Nov 22 22:30:22 2011 +0000
+++ b/sys/arch/xen/include/xenpmap.h    Wed Nov 23 00:56:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xenpmap.h,v 1.31 2011/11/08 17:16:52 cherry Exp $      */
+/*     $NetBSD: xenpmap.h,v 1.32 2011/11/23 00:56:56 jym Exp $ */
 
 /*
  *
@@ -53,6 +53,13 @@
 void xen_mcast_invlpg(vaddr_t, uint32_t);
 void xen_bcast_invlpg(vaddr_t);
 
+void pmap_xen_resume(void);
+void pmap_xen_suspend(void);
+
+#ifdef PAE
+void   pmap_map_recursive_entries(void);
+void   pmap_unmap_recursive_entries(void);
+#endif /* PAE */
 
 #define xpq_queue_pin_l1_table(pa)     \
        xpq_queue_pin_table(pa, MMUEXT_PIN_L1_TABLE)
diff -r a3236d9effcd -r 6a0c21960519 sys/arch/xen/x86/xen_pmap.c
--- a/sys/arch/xen/x86/xen_pmap.c       Tue Nov 22 22:30:22 2011 +0000
+++ b/sys/arch/xen/x86/xen_pmap.c       Wed Nov 23 00:56:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_pmap.c,v 1.9 2011/11/20 19:41:27 jym Exp $ */
+/*     $NetBSD: xen_pmap.c,v 1.10 2011/11/23 00:56:56 jym Exp $        */
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.9 2011/11/20 19:41:27 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.10 2011/11/23 00:56:56 jym Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -137,10 +137,9 @@
 #include <x86/i82489reg.h>
 #include <x86/i82489var.h>
 
-#ifdef XEN
 #include <xen/xen3-public/xen.h>
 #include <xen/hypervisor.h>
-#endif
+#include <xen/xenpmap.h>
 
 #define COUNT(x)       /* nothing */
 



Home | Main Index | Thread Index | Old Index