diff options
author | dfr <dfr@FreeBSD.org> | 1998-11-08 12:39:07 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-11-08 12:39:07 +0000 |
commit | b6d9e06815177a68a4c04bd91f2c72a3d8f38085 (patch) | |
tree | 054790d6c046f4847a676be168ee932453415ed2 /sys/vm/device_pager.c | |
parent | 2a9cd5605117404c74854f0e4b7b5ea54d7c8671 (diff) | |
download | FreeBSD-src-b6d9e06815177a68a4c04bd91f2c72a3d8f38085.zip FreeBSD-src-b6d9e06815177a68a4c04bd91f2c72a3d8f38085.tar.gz |
* Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
pass a vm_offset_t instead of an int for the offset allowing
devices with a larger memory map than (1<<32) to be supported
on the alpha (/dev/mem is one such).
These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
Diffstat (limited to 'sys/vm/device_pager.c')
-rw-r--r-- | sys/vm/device_pager.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 655af98..fe796fb 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)device_pager.c 8.1 (Berkeley) 6/11/93 - * $Id: device_pager.c,v 1.33 1998/10/21 23:06:50 dg Exp $ + * $Id: device_pager.c,v 1.34 1998/10/22 01:45:29 dg Exp $ */ #include <sys/param.h> @@ -97,7 +97,8 @@ dev_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t fo dev_t dev; d_mmap_t *mapfunc; vm_object_t object; - unsigned int npages, off; + unsigned int npages; + vm_offset_t off; /* * Make sure this device can be mapped. @@ -206,7 +207,7 @@ dev_pager_getpages(object, m, count, reqpage) if (mapfunc == NULL || mapfunc == (d_mmap_t *)nullop) panic("dev_pager_getpage: no map function"); - paddr = pmap_phys_address((*mapfunc) ((dev_t) dev, (int) offset << PAGE_SHIFT, prot)); + paddr = pmap_phys_address((*mapfunc) ((dev_t) dev, (vm_offset_t) offset << PAGE_SHIFT, prot)); #ifdef DIAGNOSTIC if (paddr == -1) panic("dev_pager_getpage: map function returns error"); |