Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/usermode Fix zero page cleaning. The suppl...



details:   https://anonhg.NetBSD.org/src/rev/18739982a3a4
branches:  trunk
changeset: 768641:18739982a3a4
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Aug 23 15:12:31 2011 +0000

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

diffstat:

 sys/arch/usermode/usermode/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b429e386ad9c -r 18739982a3a4 sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Tue Aug 23 14:37:50 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Tue Aug 23 15:12:31 2011 +0000
@@ -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 <reinoud%NetBSD.org@localhost>
@@ -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");
 }



Home | Main Index | Thread Index | Old Index