Module Name: src
Committed By: matt
Date: Tue Nov 29 07:43:55 UTC 2011
Modified Files:
src/sys/uvm: uvm_param.h
Log Message:
Redefine ptoa() to be the inverse of atop. If you were using a 32-bit vaddr_t
with 64-bit paddr_t and using managed addresses > 4GB, uvm_page_init would
silently discard the upper 32-bits of the physical address possibly double
mapping pages.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/uvm/uvm_param.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/uvm_param.h
diff -u src/sys/uvm/uvm_param.h:1.25 src/sys/uvm/uvm_param.h:1.26
--- src/sys/uvm/uvm_param.h:1.25 Sun Nov 14 04:31:02 2010
+++ src/sys/uvm/uvm_param.h Tue Nov 29 07:43:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_param.h,v 1.25 2010/11/14 04:31:02 uebayasi Exp $ */
+/* $NetBSD: uvm_param.h,v 1.26 2011/11/29 07:43:54 matt Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -199,7 +199,7 @@ extern int *uvmexp_pageshift;
*/
#ifdef _KERNEL
#define atop(x) (((paddr_t)(x)) >> PAGE_SHIFT)
-#define ptoa(x) ((vaddr_t)((vaddr_t)(x) << PAGE_SHIFT))
+#define ptoa(x) (((paddr_t)(x)) << PAGE_SHIFT)
/*
* Round off or truncate to the nearest page. These will work