summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-01-30 18:16:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-01-30 18:16:42 +0000
commit150ead6262ab7cbac1aa9cd45e3a1c47544e5c15 (patch)
tree1e82bc7c9335d090e0a0f0f3f4e179717b201a6e /sys/arch/amd64/include
parentba74087eb3865e1609b3d666f13601206dc40297 (diff)
Move declaration of struct vm_page_md from <machine/vmparam.h> to
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/pmap.h14
-rw-r--r--sys/arch/amd64/include/vmparam.h11
2 files changed, 14 insertions, 11 deletions
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h
index 1493759dc07..d1af66c6737 100644
--- a/sys/arch/amd64/include/pmap.h
+++ b/sys/arch/amd64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.41 2013/03/31 17:07:02 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.42 2014/01/30 18:16:41 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
@@ -567,4 +567,16 @@ kvtopte(vaddr_t va)
#define __HAVE_PMAP_DIRECT
#endif /* _KERNEL && !_LOCORE */
+
+#ifndef _LOCORE
+struct pv_entry;
+struct vm_page_md {
+ struct pv_entry *pv_list;
+};
+
+#define VM_MDPAGE_INIT(pg) do { \
+ (pg)->mdpage.pv_list = NULL; \
+} while (0)
+#endif /* !_LOCORE */
+
#endif /* _MACHINE_PMAP_H_ */
diff --git a/sys/arch/amd64/include/vmparam.h b/sys/arch/amd64/include/vmparam.h
index bd4b65595c8..cc78a8a8b7c 100644
--- a/sys/arch/amd64/include/vmparam.h
+++ b/sys/arch/amd64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.17 2014/01/23 22:06:29 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.18 2014/01/30 18:16:41 miod Exp $ */
/* $NetBSD: vmparam.h,v 1.1 2003/04/26 18:39:49 fvdl Exp $ */
/*-
@@ -110,13 +110,4 @@
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
-struct pv_entry;
-struct vm_page_md {
- struct pv_entry *pv_list;
-};
-
-#define VM_MDPAGE_INIT(pg) do { \
- (pg)->mdpage.pv_list = NULL; \
-} while (0)
-
#endif /* _MACHINE_VMPARAM_H_ */