Module Name: src
Committed By: riastradh
Date: Sun Aug 21 10:18:20 UTC 2022
Modified Files:
src/sys/rump/librump/rumpkern: vm.c
Log Message:
rumpkern: Abusing struct pmap internals now requires extra effort.
(as it should)
To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/rump/librump/rumpkern/vm.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/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.192 src/sys/rump/librump/rumpkern/vm.c:1.193
--- src/sys/rump/librump/rumpkern/vm.c:1.192 Thu Sep 16 21:29:42 2021
+++ src/sys/rump/librump/rumpkern/vm.c Sun Aug 21 10:18:20 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: vm.c,v 1.192 2021/09/16 21:29:42 andvar Exp $ */
+/* $NetBSD: vm.c,v 1.193 2022/08/21 10:18:20 riastradh Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.192 2021/09/16 21:29:42 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.193 2022/08/21 10:18:20 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -56,6 +56,19 @@ __KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.192
#include <machine/pmap.h>
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * This file abuses the pmap abstraction to create its own statically
+ * allocated struct pmap object, even though it can't do anything
+ * useful with such a thing from userland. On x86 the struct pmap
+ * definition is private, so we have to go to extra effort to abuse it
+ * there. This should be fixed -- all of the struct pmap definitions
+ * should be private, and then rump can furnish its own fake struct
+ * pmap without clashing with anything.
+ */
+#include <machine/pmap_private.h>
+#endif
+
#include <uvm/uvm.h>
#include <uvm/uvm_ddb.h>
#include <uvm/uvm_pdpolicy.h>