Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm In udv_fault(), use an off_t for curr_offset so that...
details: https://anonhg.NetBSD.org/src/rev/8193784e5d56
branches: trunk
changeset: 493923:8193784e5d56
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Jun 27 06:14:24 2000 +0000
description:
In udv_fault(), use an off_t for curr_offset so that the offset passed
to d_mmap isn't truncated on 64 bit architectures.
diffstat:
sys/uvm/uvm_device.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 0bd70f1294f8 -r 8193784e5d56 sys/uvm/uvm_device.c
--- a/sys/uvm/uvm_device.c Tue Jun 27 05:57:05 2000 +0000
+++ b/sys/uvm/uvm_device.c Tue Jun 27 06:14:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_device.c,v 1.26 2000/06/26 14:21:17 mrg Exp $ */
+/* $NetBSD: uvm_device.c,v 1.27 2000/06/27 06:14:24 simonb Exp $ */
/*
*
@@ -407,7 +407,7 @@
struct uvm_object *uobj = entry->object.uvm_obj;
struct uvm_device *udv = (struct uvm_device *)uobj;
vaddr_t curr_va;
- int curr_offset;
+ off_t curr_offset;
paddr_t paddr, mdpgno;
int lcv, retval;
dev_t device;
@@ -448,7 +448,7 @@
* addresses in a submap must match the main map, this is ok.
*/
/* udv offset = (offset from start of entry) + entry's offset */
- curr_offset = (int)((vaddr - entry->start) + entry->offset);
+ curr_offset = entry->offset + (vaddr - entry->start);
/* pmap va = vaddr (virtual address of pps[0]) */
curr_va = vaddr;
@@ -473,8 +473,8 @@
paddr = pmap_phys_address(mdpgno);
mapprot = ufi->entry->protection;
UVMHIST_LOG(maphist,
- " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%x, at=%d",
- ufi->orig_map->pmap, curr_va, (int)paddr, mapprot);
+ " MAPPING: device: pm=0x%x, va=0x%x, pa=0x%lx, at=%d",
+ ufi->orig_map->pmap, curr_va, paddr, mapprot);
if (pmap_enter(ufi->orig_map->pmap, curr_va, paddr,
mapprot, PMAP_CANFAIL | mapprot) != KERN_SUCCESS) {
/*
Home |
Main Index |
Thread Index |
Old Index