Source-Changes-HG archive

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

[src/rmind-uvmplock]: src/sys - mm_init: disable pmap_protect() call on zero-...



details:   https://anonhg.NetBSD.org/src/rev/c6203df4fe43
branches:  rmind-uvmplock
changeset: 753069:c6203df4fe43
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sun Mar 06 01:38:45 2011 +0000

description:
- mm_init: disable pmap_protect() call on zero-page for now (x86 pmap issue).
- Run evcnt_init() a little bit earlier, before uvm_init().

diffstat:

 sys/dev/mm.c         |   6 ++++--
 sys/kern/init_main.c |  10 +++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (66 lines):

diff -r a224223d5fc6 -r c6203df4fe43 sys/dev/mm.c
--- a/sys/dev/mm.c      Sun Mar 06 00:26:56 2011 +0000
+++ b/sys/dev/mm.c      Sun Mar 06 01:38:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mm.c,v 1.13.16.4 2010/06/02 03:12:43 rmind Exp $       */
+/*     $NetBSD: mm.c,v 1.13.16.5 2011/03/06 01:38:45 rmind Exp $       */
 
 /*-
  * Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.13.16.4 2010/06/02 03:12:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.13.16.5 2011/03/06 01:38:45 rmind Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -89,7 +89,9 @@
        /* Read-only zero-page. */
        pg = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_WIRED|UVM_KMF_ZERO);
        KASSERT(pg != 0);
+#if 0
        pmap_protect(pmap_kernel(), pg, pg + PAGE_SIZE, VM_PROT_READ);
+#endif
        pmap_update(pmap_kernel());
        dev_zero_page = (void *)pg;
 
diff -r a224223d5fc6 -r c6203df4fe43 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Sun Mar 06 00:26:56 2011 +0000
+++ b/sys/kern/init_main.c      Sun Mar 06 01:38:45 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_main.c,v 1.418.4.4 2011/03/05 20:55:12 rmind Exp $        */
+/*     $NetBSD: init_main.c,v 1.418.4.5 2011/03/06 01:38:45 rmind Exp $        */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.418.4.4 2011/03/05 20:55:12 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.418.4.5 2011/03/06 01:38:45 rmind Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ipsec.h"
@@ -308,6 +308,9 @@
        /* Initialize the device switch tables. */
        devsw_init();
 
+       /* Initialize event counters. */
+       evcnt_init();
+
        uvm_init();
 
        prop_kern_init();
@@ -326,9 +329,6 @@
        /* Initialize the extent manager. */
        extent_init();
 
-       /* Initialize event counters */
-       evcnt_init();
-
        /* Do machine-dependent initialization. */
        cpu_startup();
 



Home | Main Index | Thread Index | Old Index