Source-Changes-HG archive

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

[src/trunk]: src/sys Fix fallout from previous uvm.h cleanup.



details:   https://anonhg.NetBSD.org/src/rev/271103d51762
branches:  trunk
changeset: 943550:271103d51762
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Sep 06 02:18:53 2020 +0000

description:
Fix fallout from previous uvm.h cleanup.

- pmap(9) needs uvm/uvm_extern.h.

- x86/pmap.h is not usable on its own; it is only usable if included
  via uvm/uvm_extern.h (-> uvm/uvm_pmap.h -> machine/pmap.h).

- Make nvmm.h and nvmm_internal.h standalone.

diffstat:

 sys/arch/x86/x86/pmap.c              |   5 ++---
 sys/arch/xen/x86/x86_xpmap.c         |   6 +++---
 sys/arch/xen/x86/xen_pmap.c          |   5 ++---
 sys/dev/nvmm/nvmm_internal.h         |  14 +++++++++++++-
 sys/dev/nvmm/x86/nvmm_x86.c          |   7 ++++---
 sys/dev/nvmm/x86/nvmm_x86_svm.c      |   7 ++++---
 sys/dev/nvmm/x86/nvmm_x86_vmx.c      |   7 ++++---
 sys/modules/examples/mapper/mapper.c |   6 ++++--
 8 files changed, 36 insertions(+), 21 deletions(-)

diffs (230 lines):

diff -r da5d977f0900 -r 271103d51762 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/arch/x86/x86/pmap.c   Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.406 2020/09/02 17:37:57 bouyer Exp $        */
+/*     $NetBSD: pmap.c,v 1.407 2020/09/06 02:18:53 riastradh Exp $     */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.406 2020/09/02 17:37:57 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.407 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -167,7 +167,6 @@
 #include <machine/cpuvar.h>
 #include <machine/cputypes.h>
 
-#include <x86/pmap.h>
 #include <x86/pmap_pv.h>
 
 #include <x86/i82489reg.h>
diff -r da5d977f0900 -r 271103d51762 sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c      Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c      Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_xpmap.c,v 1.89 2020/05/26 10:10:32 bouyer Exp $    */
+/*     $NetBSD: x86_xpmap.c,v 1.90 2020/09/06 02:18:53 riastradh Exp $ */
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.89 2020/05/26 10:10:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.90 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -109,8 +109,8 @@
 
 #include <uvm/uvm.h>
 
-#include <x86/pmap.h>
 #include <machine/gdt.h>
+
 #include <xen/xenfunc.h>
 
 #include <dev/isa/isareg.h>
diff -r da5d977f0900 -r 271103d51762 sys/arch/xen/x86/xen_pmap.c
--- a/sys/arch/xen/x86/xen_pmap.c       Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/arch/xen/x86/xen_pmap.c       Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_pmap.c,v 1.38 2020/07/19 13:55:09 maxv Exp $       */
+/*     $NetBSD: xen_pmap.c,v 1.39 2020/09/06 02:18:53 riastradh Exp $  */
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -101,7 +101,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.38 2020/07/19 13:55:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.39 2020/09/06 02:18:53 riastradh Exp $");
 
 #include "opt_lockdebug.h"
 #include "opt_multiprocessor.h"
@@ -125,7 +125,6 @@
 #include <machine/isa_machdep.h>
 #include <machine/cpuvar.h>
 
-#include <x86/pmap.h>
 #include <x86/pmap_pv.h>
 
 #include <x86/i82489reg.h>
diff -r da5d977f0900 -r 271103d51762 sys/dev/nvmm/nvmm_internal.h
--- a/sys/dev/nvmm/nvmm_internal.h      Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/dev/nvmm/nvmm_internal.h      Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_internal.h,v 1.18 2020/09/05 07:22:25 maxv Exp $  */
+/*     $NetBSD: nvmm_internal.h,v 1.19 2020/09/06 02:18:53 riastradh Exp $     */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -31,6 +31,18 @@
 #ifndef _NVMM_INTERNAL_H_
 #define _NVMM_INTERNAL_H_
 
+#include <sys/types.h>
+
+#include <sys/lwp.h>
+#include <sys/mutex.h>
+#include <sys/rwlock.h>
+#include <sys/sched.h>
+
+#include <dev/nvmm/nvmm.h>
+
+struct uvm_object;
+struct vmspace;
+
 #define NVMM_MAX_MACHINES      128
 #define NVMM_MAX_VCPUS         256
 #define NVMM_MAX_HMAPPINGS     32
diff -r da5d977f0900 -r 271103d51762 sys/dev/nvmm/x86/nvmm_x86.c
--- a/sys/dev/nvmm/x86/nvmm_x86.c       Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86.c       Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86.c,v 1.19 2020/09/05 16:30:11 riastradh Exp $  */
+/*     $NetBSD: nvmm_x86.c,v 1.20 2020/09/06 02:18:53 riastradh Exp $  */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,16 +29,17 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.19 2020/09/05 16:30:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86.c,v 1.20 2020/09/06 02:18:53 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
 #include <sys/cpu.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <x86/cputypes.h>
 #include <x86/specialreg.h>
-#include <x86/pmap.h>
 
 #include <dev/nvmm/nvmm.h>
 #include <dev/nvmm/nvmm_internal.h>
diff -r da5d977f0900 -r 271103d51762 sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c   Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c   Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_svm.c,v 1.78 2020/09/05 16:30:11 riastradh Exp $      */
+/*     $NetBSD: nvmm_x86_svm.c,v 1.79 2020/09/06 02:18:53 riastradh Exp $      */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.78 2020/09/05 16:30:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.79 2020/09/06 02:18:53 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -40,12 +40,13 @@
 #include <sys/mman.h>
 
 #include <uvm/uvm_extern.h>
+#include <uvm/uvm_page.h>
 
 #include <x86/cputypes.h>
 #include <x86/specialreg.h>
-#include <x86/pmap.h>
 #include <x86/dbregs.h>
 #include <x86/cpu_counter.h>
+
 #include <machine/cpuvar.h>
 
 #include <dev/nvmm/nvmm.h>
diff -r da5d977f0900 -r 271103d51762 sys/dev/nvmm/x86/nvmm_x86_vmx.c
--- a/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_vmx.c,v 1.77 2020/09/05 16:30:11 riastradh Exp $      */
+/*     $NetBSD: nvmm_x86_vmx.c,v 1.78 2020/09/06 02:18:53 riastradh Exp $      */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.77 2020/09/05 16:30:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.78 2020/09/06 02:18:53 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -41,12 +41,13 @@
 #include <sys/bitops.h>
 
 #include <uvm/uvm_extern.h>
+#include <uvm/uvm_page.h>
 
 #include <x86/cputypes.h>
 #include <x86/specialreg.h>
-#include <x86/pmap.h>
 #include <x86/dbregs.h>
 #include <x86/cpu_counter.h>
+
 #include <machine/cpuvar.h>
 
 #include <dev/nvmm/nvmm.h>
diff -r da5d977f0900 -r 271103d51762 sys/modules/examples/mapper/mapper.c
--- a/sys/modules/examples/mapper/mapper.c      Sat Sep 05 23:18:49 2020 +0000
+++ b/sys/modules/examples/mapper/mapper.c      Sun Sep 06 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mapper.c,v 1.3 2020/09/05 16:30:12 riastradh Exp $     */
+/*     $NetBSD: mapper.c,v 1.4 2020/09/06 02:18:53 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mapper.c,v 1.3 2020/09/05 16:30:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mapper.c,v 1.4 2020/09/06 02:18:53 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -37,6 +37,8 @@
 #include <sys/module.h>
 #include <sys/systm.h>
 
+#include <uvm/uvm_extern.h>
+
 /*
  * Creating a device /dev/mapper for demonstration.
  * To use this device you need to do:



Home | Main Index | Thread Index | Old Index