Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/chs-ubc2]: src/sys/uvm add a few casts to play better with 64bit vnode o...
details: https://anonhg.NetBSD.org/src/rev/b462d2242003
branches: chs-ubc2
changeset: 471458:b462d2242003
user: chs <chs%NetBSD.org@localhost>
date: Wed Aug 11 05:41:40 1999 +0000
description:
add a few casts to play better with 64bit vnode offsets.
diffstat:
sys/uvm/uvm_bio.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r c1ed9727ac8b -r b462d2242003 sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Wed Aug 11 05:40:13 1999 +0000
+++ b/sys/uvm/uvm_bio.c Wed Aug 11 05:41:40 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_bio.c,v 1.1.4.5 1999/08/09 00:05:55 chs Exp $ */
+/* $NetBSD: uvm_bio.c,v 1.1.4.6 1999/08/11 05:41:40 chs Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@@ -68,7 +68,8 @@
*/
#define UBC_HASH(uobj, offset) (((long)(uobj) / sizeof(struct uvm_object) + \
- (offset) / UBC_WINSIZE) & ubc_object.hashmask)
+ (long)(offset) / UBC_WINSIZE) & \
+ ubc_object.hashmask)
#define UBC_QUEUE(offset) (&ubc_object.inactive[((offset) / UBC_WINSIZE) & \
(UBC_NQUEUES - 1)])
@@ -442,8 +443,8 @@
UVMHIST_LOG(ubchist, "uobj %p offset 0x%lx len 0x%lx",
uobj, offset, *lenp,0);
- umap_offset = offset & ~(UBC_WINSIZE - 1);
- slot_offset = offset & (UBC_WINSIZE - 1);
+ umap_offset = (vaddr_t)(offset & ~((voff_t)UBC_WINSIZE - 1));
+ slot_offset = (vaddr_t)(offset & ((voff_t)UBC_WINSIZE - 1));
*lenp = min(*lenp, UBC_WINSIZE - slot_offset);
/*
Home |
Main Index |
Thread Index |
Old Index