diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 8 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 8 | ||||
-rw-r--r-- | sys/vm/device_pager.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 8 | ||||
-rw-r--r-- | sys/vm/vm_object.h | 6 |
5 files changed, 12 insertions, 20 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d3478d2..17bcd80 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2493,14 +2493,10 @@ retry: ((objpgs > 0) && (p != NULL)); p = TAILQ_NEXT(p, listq)) { - tmpidx = p->pindex; - if (tmpidx < pindex) { - continue; - } - tmpidx -= pindex; - if (tmpidx >= psize) { + if (p->pindex < pindex || p->pindex - pindex > psize) { continue; } + tmpidx = p->pindex - pindex; /* * don't allow an madvise to blow away our really * free pages allocating pv entries. diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index d3478d2..17bcd80 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2493,14 +2493,10 @@ retry: ((objpgs > 0) && (p != NULL)); p = TAILQ_NEXT(p, listq)) { - tmpidx = p->pindex; - if (tmpidx < pindex) { - continue; - } - tmpidx -= pindex; - if (tmpidx >= psize) { + if (p->pindex < pindex || p->pindex - pindex > psize) { continue; } + tmpidx = p->pindex - pindex; /* * don't allow an madvise to blow away our really * free pages allocating pv entries. diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 4eb4ebd..890d068 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -201,7 +201,7 @@ dev_pager_getpages(object, m, count, reqpage) int count; int reqpage; { - vm_offset_t offset; + vm_pindex_t offset; vm_offset_t paddr; vm_page_t page; dev_t dev; diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index b07d6b8..33b597b 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -187,7 +187,7 @@ vm_object_zinit(void *mem, int size) } void -_vm_object_allocate(objtype_t type, vm_size_t size, vm_object_t object) +_vm_object_allocate(objtype_t type, vm_pindex_t size, vm_object_t object) { static int object_hash_rand; int exp, incr; @@ -341,7 +341,7 @@ vm_object_pip_wait(vm_object_t object, char *waitid) * Returns a new object with the given size. */ vm_object_t -vm_object_allocate(objtype_t type, vm_size_t size) +vm_object_allocate(objtype_t type, vm_pindex_t size) { vm_object_t result; @@ -626,7 +626,7 @@ void vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int flags) { vm_page_t p, np; - vm_offset_t tstart, tend; + vm_pindex_t tstart, tend; vm_pindex_t pi; struct vnode *vp; int clearobjflags; @@ -1697,7 +1697,7 @@ void vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end, boolean_t clean_only) { vm_page_t p, next; - unsigned int size; + vm_pindex_t size; int all; if (object == NULL) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 53db319..65e32af 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -93,7 +93,7 @@ struct vm_object { TAILQ_ENTRY(vm_object) shadow_list; /* chain of shadow objects */ TAILQ_HEAD(, vm_page) memq; /* list of resident pages */ int generation; /* generation ID */ - vm_size_t size; /* Object size */ + vm_pindex_t size; /* Object size */ int ref_count; /* How many refs?? */ int shadow_count; /* how many objects that this is a shadow for */ int hash_rand; /* (c) hash table randomizer */ @@ -182,8 +182,8 @@ void vm_object_pip_wakeupn(vm_object_t object, short i); void vm_object_pip_sleep(vm_object_t object, char *waitid); void vm_object_pip_wait(vm_object_t object, char *waitid); -vm_object_t vm_object_allocate (objtype_t, vm_size_t); -void _vm_object_allocate (objtype_t, vm_size_t, vm_object_t); +vm_object_t vm_object_allocate (objtype_t, vm_pindex_t); +void _vm_object_allocate (objtype_t, vm_pindex_t, vm_object_t); boolean_t vm_object_coalesce (vm_object_t, vm_pindex_t, vm_size_t, vm_size_t); void vm_object_collapse (vm_object_t); void vm_object_deallocate (vm_object_t); |