Module Name:    src
Committed By:   matt
Date:           Tue Nov 29 07:44:52 UTC 2011

Modified Files:
        src/sys/uvm [matt-nb5-mips64]: 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.21 -r1.21.78.1 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.21 src/sys/uvm/uvm_param.h:1.21.78.1
--- src/sys/uvm/uvm_param.h:1.21	Fri Aug  4 22:42:36 2006
+++ src/sys/uvm/uvm_param.h	Tue Nov 29 07:44:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_param.h,v 1.21 2006/08/04 22:42:36 he Exp $	*/
+/*	$NetBSD: uvm_param.h,v 1.21.78.1 2011/11/29 07:44:52 matt Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -196,7 +196,7 @@
  */
 #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

Reply via email to