diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 19:28:16 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-28 19:28:16 +0000 |
commit | cba71608cdd2f0b18c4f6ff86897f18e4c30118a (patch) | |
tree | b92e865b4ac88831d7b112a580bfcf3af96d5ed8 /sys/uvm/uvm_fault_i.h | |
parent | e6a242c5ac01267b1b262ca9daa51b8ef92c97e2 (diff) |
Sync in more uvm from NetBSD. Mostly just cosmetic stuff.
Contains also support for page coloring.
Diffstat (limited to 'sys/uvm/uvm_fault_i.h')
-rw-r--r-- | sys/uvm/uvm_fault_i.h | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/sys/uvm/uvm_fault_i.h b/sys/uvm/uvm_fault_i.h index 66f98503340..f262e48f09f 100644 --- a/sys/uvm/uvm_fault_i.h +++ b/sys/uvm/uvm_fault_i.h @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_fault_i.h,v 1.7 2001/11/05 22:14:54 art Exp $ */ -/* $NetBSD: uvm_fault_i.h,v 1.11 2000/06/26 14:21:17 mrg Exp $ */ +/* $OpenBSD: uvm_fault_i.h,v 1.8 2001/11/28 19:28:14 art Exp $ */ +/* $NetBSD: uvm_fault_i.h,v 1.14 2001/06/26 17:55:15 thorpej Exp $ */ /* * @@ -41,7 +41,6 @@ /* * uvm_fault_i.h: fault inline functions */ -static boolean_t uvmfault_check_intrsafe __P((struct uvm_faultinfo *)); static boolean_t uvmfault_lookup __P((struct uvm_faultinfo *, boolean_t)); static boolean_t uvmfault_relock __P((struct uvm_faultinfo *)); static void uvmfault_unlockall __P((struct uvm_faultinfo *, struct vm_amap *, @@ -97,39 +96,6 @@ uvmfault_unlockall(ufi, amap, uobj, anon) } /* - * uvmfault_check_intrsafe: check for a virtual address managed by - * an interrupt-safe map. - * - * => caller must provide a uvm_faultinfo structure with the IN - * params properly filled in - * => if we find an intersafe VA, we fill in ufi->map, and return TRUE - */ - -static __inline boolean_t -uvmfault_check_intrsafe(ufi) - struct uvm_faultinfo *ufi; -{ - struct vm_map_intrsafe *vmi; - int s; - - s = vmi_list_lock(); - for (vmi = LIST_FIRST(&vmi_list); vmi != NULL; - vmi = LIST_NEXT(vmi, vmi_list)) { - if (ufi->orig_rvaddr >= vm_map_min(&vmi->vmi_map) && - ufi->orig_rvaddr < vm_map_max(&vmi->vmi_map)) - break; - } - vmi_list_unlock(s); - - if (vmi != NULL) { - ufi->map = &vmi->vmi_map; - return (TRUE); - } - - return (FALSE); -} - -/* * uvmfault_lookup: lookup a virtual address in a map * * => caller must provide a uvm_faultinfo structure with the IN @@ -138,7 +104,7 @@ uvmfault_check_intrsafe(ufi) * => if the lookup is a success we will return with the maps locked * => if "write_lock" is TRUE, we write_lock the map, otherwise we only * get a read lock. - * => note that submaps can only appear in the kernel and they are + * => note that submaps can only appear in the kernel and they are * required to use the same virtual addresses as the map they * are referenced by (thus address translation between the main * map and the submap is unnecessary). @@ -149,7 +115,7 @@ uvmfault_lookup(ufi, write_lock) struct uvm_faultinfo *ufi; boolean_t write_lock; { - vm_map_t tmpmap; + struct vm_map *tmpmap; /* * init ufi values for lookup. @@ -164,6 +130,13 @@ uvmfault_lookup(ufi, write_lock) */ while (1) { + /* + * Make sure this is not an "interrupt safe" map. + * Such maps are never supposed to be involved in + * a fault. + */ + if (ufi->map->flags & VM_MAP_INTRSAFE) + return (FALSE); /* * lock map @@ -177,7 +150,7 @@ uvmfault_lookup(ufi, write_lock) /* * lookup */ - if (!uvm_map_lookup_entry(ufi->map, ufi->orig_rvaddr, + if (!uvm_map_lookup_entry(ufi->map, ufi->orig_rvaddr, &ufi->entry)) { uvmfault_unlockmaps(ufi, write_lock); return(FALSE); @@ -239,7 +212,7 @@ uvmfault_relock(ufi) uvmexp.fltrelck++; /* - * relock map. fail if version mismatch (in which case nothing + * relock map. fail if version mismatch (in which case nothing * gets locked). */ |