Module Name:    src
Committed By:   reinoud
Date:           Tue Aug 23 15:12:31 UTC 2011

Modified Files:
        src/sys/arch/usermode/usermode: pmap.c

Log Message:
Fix zero page cleaning. The supplied `pa' is a physical address and no page
number so don't multiply with PAGE_SIZE


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/usermode/usermode/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.21 src/sys/arch/usermode/usermode/pmap.c:1.22
--- src/sys/arch/usermode/usermode/pmap.c:1.21	Tue Aug 23 14:23:08 2011
+++ src/sys/arch/usermode/usermode/pmap.c	Tue Aug 23 15:12:31 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.21 2011/08/23 14:23:08 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.22 2011/08/23 15:12:31 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <rein...@netbsd.org>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.21 2011/08/23 14:23:08 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.22 2011/08/23 15:12:31 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -673,7 +673,7 @@
 	aprint_debug("pmap_zero_page: pa %p\n", (void *) pa);
 
 	memset(blob, 0, PAGE_SIZE);
-	num = thunk_pwrite(mem_fh, blob, PAGE_SIZE, pa*PAGE_SIZE);
+	num = thunk_pwrite(mem_fh, blob, PAGE_SIZE, pa);
 	if (num != PAGE_SIZE)
 		panic("pmap_zero_page couldn't write out\n");
 }

Reply via email to