summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_extern.h
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-06-07 02:01:55 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-06-07 02:01:55 +0000
commitde04e97dc207dd91524400f05ce8692dc4886fb9 (patch)
treeaa3c7d5620161d7d420f34f2c13e439539e985ac /sys/uvm/uvm_extern.h
parentc3ddcbacba908d63f313a0eb0ba8fd0010b40d2e (diff)
extend uvm_page_physload to have the ability to add "device" pages to the
system. This is needed in the case where you need managed pages so you can handle faulting and pmap_page_protect() on said pages when you manage memory in such regions (i'm looking at you, graphics cards). these pages are flagged PG_DEV, and shall never be on the freelists, assert this. behaviour remains unchanged in the non-device case, specifically for all archs currently in the tree we panic if called after bootstrap. ok art@, kettenis@, ariane@, beck@.
Diffstat (limited to 'sys/uvm/uvm_extern.h')
-rw-r--r--sys/uvm/uvm_extern.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h
index bc6a766590a..1cf804ba3d1 100644
--- a/sys/uvm/uvm_extern.h
+++ b/sys/uvm/uvm_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_extern.h,v 1.77 2009/06/01 17:42:33 ariane Exp $ */
+/* $OpenBSD: uvm_extern.h,v 1.78 2009/06/07 02:01:54 oga Exp $ */
/* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */
/*
@@ -235,6 +235,11 @@ typedef int vm_prot_t;
#define UVM_LK_EXIT 0x00000002 /* leave map locked on exit */
/*
+ * flags to uvm_physload.
+ */
+#define PHYSLOAD_DEVICE 0x01 /* don't add to the page queue */
+
+/*
* structures
*/
@@ -570,8 +575,10 @@ vaddr_t uvm_pagealloc_contig(vaddr_t, vaddr_t,
void uvm_pagerealloc(struct vm_page *,
struct uvm_object *, voff_t);
/* Actually, uvm_page_physload takes PF#s which need their own type */
-void uvm_page_physload(paddr_t, paddr_t,
- paddr_t, paddr_t, int);
+void uvm_page_physload_flags(paddr_t, paddr_t, paddr_t,
+ paddr_t, int, int);
+#define uvm_page_physload(s, e, as, ae, fl) \
+ uvm_page_physload_flags(s, e, as, ae, fl, 0)
void uvm_setpagesize(void);
void uvm_shutdown(void);