summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_pager.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-19 08:58:08 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-19 08:58:08 +0000
commitd8afae924f4db99650aa0df115c6ae66ed02b950 (patch)
treea2cbc045f0eb624a394f8e45fea1a58ecf1faaf0 /sys/uvm/uvm_pager.h
parent4a6c79ff4f05aaae32458104529a9a9e0d3d208b (diff)
UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually don't know when or why) files disappeared. Since we've not been able to track down the problem in two weeks intense debugging and we need -current to be stable, back out everything to a state it had before UBC. We apologise for the inconvenience.
Diffstat (limited to 'sys/uvm/uvm_pager.h')
-rw-r--r--sys/uvm/uvm_pager.h47
1 files changed, 34 insertions, 13 deletions
diff --git a/sys/uvm/uvm_pager.h b/sys/uvm/uvm_pager.h
index 6b7ddc02d24..37592460b28 100644
--- a/sys/uvm/uvm_pager.h
+++ b/sys/uvm/uvm_pager.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_pager.h,v 1.16 2001/11/28 19:28:15 art Exp $ */
-/* $NetBSD: uvm_pager.h,v 1.23 2001/05/26 21:27:21 chs Exp $ */
+/* $OpenBSD: uvm_pager.h,v 1.17 2001/12/19 08:58:07 art Exp $ */
+/* $NetBSD: uvm_pager.h,v 1.20 2000/11/27 08:40:05 chs Exp $ */
/*
*
@@ -89,21 +89,20 @@
struct uvm_pagerops {
void (*pgo_init) __P((void));/* init pager */
void (*pgo_reference) /* add reference to obj */
- __P((struct uvm_object *));
+ __P((struct uvm_object *));
void (*pgo_detach) /* drop reference to obj */
__P((struct uvm_object *));
int (*pgo_fault) /* special nonstd fault fn */
__P((struct uvm_faultinfo *, vaddr_t,
- struct vm_page **, int, int, vm_fault_t,
+ vm_page_t *, int, int, vm_fault_t,
vm_prot_t, int));
boolean_t (*pgo_flush) /* flush pages out of obj */
__P((struct uvm_object *, voff_t, voff_t, int));
int (*pgo_get) /* get/read page */
__P((struct uvm_object *, voff_t,
- struct vm_page **, int *, int, vm_prot_t, int,
- int));
+ vm_page_t *, int *, int, vm_prot_t, int, int));
int (*pgo_put) /* put/write page */
- __P((struct uvm_object *, struct vm_page **,
+ __P((struct uvm_object *, vm_page_t *,
int, boolean_t));
void (*pgo_cluster) /* return range of cluster */
__P((struct uvm_object *, voff_t, voff_t *,
@@ -144,7 +143,7 @@ struct uvm_pagerops {
#ifdef UVM_PAGER_INLINE
#define PAGER_INLINE static __inline
-#else
+#else
#define PAGER_INLINE /* nothing */
#endif /* UVM_PAGER_INLINE */
@@ -152,12 +151,12 @@ struct uvm_pagerops {
* prototypes
*/
-void uvm_pager_dropcluster __P((struct uvm_object *,
- struct vm_page *, struct vm_page **,
+void uvm_pager_dropcluster __P((struct uvm_object *,
+ struct vm_page *, struct vm_page **,
int *, int));
void uvm_pager_init __P((void));
-int uvm_pager_put __P((struct uvm_object *, struct vm_page *,
- struct vm_page ***, int *, int,
+int uvm_pager_put __P((struct uvm_object *, struct vm_page *,
+ struct vm_page ***, int *, int,
voff_t, voff_t));
PAGER_INLINE struct vm_page *uvm_pageratop __P((vaddr_t));
@@ -165,8 +164,9 @@ PAGER_INLINE struct vm_page *uvm_pageratop __P((vaddr_t));
vaddr_t uvm_pagermapin __P((struct vm_page **, int, int));
void uvm_pagermapout __P((vaddr_t, int));
struct vm_page **uvm_mk_pcluster __P((struct uvm_object *, struct vm_page **,
- int *, struct vm_page *, int,
+ int *, struct vm_page *, int,
voff_t, voff_t));
+int uvm_errno2vmerror __P((int));
/* Flags to uvm_pagermapin() */
#define UVMPAGER_MAPIN_WAITOK 0x01 /* it's okay to wait */
@@ -174,6 +174,27 @@ struct vm_page **uvm_mk_pcluster __P((struct uvm_object *, struct vm_page **,
#define UVMPAGER_MAPIN_WRITE 0x00 /* device -> host (pseudo flag) */
/*
+ * get/put return values
+ * OK operation was successful
+ * BAD specified data was out of the accepted range
+ * FAIL specified data was in range, but doesn't exist
+ * PEND operations was initiated but not completed
+ * ERROR error while accessing data that is in range and exists
+ * AGAIN temporary resource shortage prevented operation from happening
+ * UNLOCK unlock the map and try again
+ * REFAULT [uvm_fault internal use only!] unable to relock data structures,
+ * thus the mapping needs to be reverified before we can procede
+ */
+#define VM_PAGER_OK 0
+#define VM_PAGER_BAD 1
+#define VM_PAGER_FAIL 2
+#define VM_PAGER_PEND 3
+#define VM_PAGER_ERROR 4
+#define VM_PAGER_AGAIN 5
+#define VM_PAGER_UNLOCK 6
+#define VM_PAGER_REFAULT 7
+
+/*
* XXX
* this is needed until the device strategy interface
* is changed to do physically-addressed i/o.