Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm atop(): cast argument to `paddr_t' (instead of `u_lo...



details:   https://anonhg.NetBSD.org/src/rev/f22428b8e3f7
branches:  trunk
changeset: 501936:f22428b8e3f7
user:      pk <pk%NetBSD.org@localhost>
date:      Tue Jan 09 13:55:20 2001 +0000

description:
atop(): cast argument to `paddr_t' (instead of `u_long') to avoid
truncating the address.

diffstat:

 sys/uvm/uvm_param.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 8d31cc8b6b87 -r f22428b8e3f7 sys/uvm/uvm_param.h
--- a/sys/uvm/uvm_param.h       Tue Jan 09 13:01:03 2001 +0000
+++ b/sys/uvm/uvm_param.h       Tue Jan 09 13:55:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_param.h,v 1.3 2000/12/21 00:52:01 chs Exp $        */
+/*     $NetBSD: uvm_param.h,v 1.4 2001/01/09 13:55:20 pk Exp $ */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -141,7 +141,7 @@
  *     No rounding is used.
  */
 #ifdef _KERNEL
-#define        atop(x)         (((unsigned long)(x)) >> PAGE_SHIFT)
+#define        atop(x)         (((paddr_t)(x)) >> PAGE_SHIFT)
 #define        ptoa(x)         ((vaddr_t)((vaddr_t)(x) << PAGE_SHIFT))
 
 /*



Home | Main Index | Thread Index | Old Index