-/* $OpenBSD: pmap.h,v 1.11 2014/04/08 09:34:23 mpi Exp $ */
+/* $OpenBSD: pmap.h,v 1.12 2014/05/08 21:31:56 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
#include <uvm/uvm_object.h>
+#if !defined(_LOCORE)
+
+#include <sys/lock.h>
+
+struct pv_entry;
+struct vm_page_md {
+ struct simplelock pvh_lock; /* locks every pv on this list */
+ struct pv_entry *pvh_list; /* head of list (locked by pvh_lock) */
+ u_int pvh_attrs; /* to preserve ref/mod */
+};
+
+#define VM_MDPAGE_INIT(pg) do { \
+ simple_lock_init(&(pg)->mdpage.pvh_lock); \
+ (pg)->mdpage.pvh_list = NULL; \
+ (pg)->mdpage.pvh_attrs = 0; \
+} while (0)
+#endif
+
#ifdef _KERNEL
+#include <uvm/uvm_page.h>
#include <machine/pte.h>
struct pmap {
#endif /* _KERNEL */
-#if !defined(_LOCORE)
-
-#include <sys/lock.h>
-
-struct pv_entry;
-struct vm_page_md {
- struct simplelock pvh_lock; /* locks every pv on this list */
- struct pv_entry *pvh_list; /* head of list (locked by pvh_lock) */
- u_int pvh_attrs; /* to preserve ref/mod */
-};
-
-#define VM_MDPAGE_INIT(pg) do { \
- simple_lock_init(&(pg)->mdpage.pvh_lock); \
- (pg)->mdpage.pvh_list = NULL; \
- (pg)->mdpage.pvh_attrs = 0; \
-} while (0)
-#endif
-
#endif /* _MACHINE_PMAP_H_ */