Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 pmap_kenter_pa: always print about already ...



details:   https://anonhg.NetBSD.org/src/rev/3a46bb900d02
branches:  trunk
changeset: 777527:3a46bb900d02
user:      rmind <rmind%NetBSD.org@localhost>
date:      Tue Feb 21 21:09:51 2012 +0000

description:
pmap_kenter_pa: always print about already present mapping.
pmap_bootstrap: add comments.

diffstat:

 sys/arch/x86/x86/pmap.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 5b960234f37b -r 3a46bb900d02 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Tue Feb 21 20:53:34 2012 +0000
+++ b/sys/arch/x86/x86/pmap.c   Tue Feb 21 21:09:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.168 2012/02/21 19:25:05 bouyer Exp $        */
+/*     $NetBSD: pmap.c,v 1.169 2012/02/21 21:09:51 rmind Exp $ */
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.168 2012/02/21 19:25:05 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2012/02/21 21:09:51 rmind Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -998,10 +998,8 @@
                panic("%s: PG_PS", __func__);
 #endif
        if ((opte & (PG_V | PG_U)) == (PG_V | PG_U)) {
-#if defined(DIAGNOSTIC)
+               /* This should not happen. */
                printf_nolog("%s: mapping already present\n", __func__);
-#endif
-               /* This should not happen. */
                kpreempt_disable();
                pmap_tlb_shootdown(pmap_kernel(), va, opte, TLBSHOOT_KENTER);
                kpreempt_enable();
@@ -1314,7 +1312,10 @@
 
        /*
         * Map the direct map.  Use 1GB pages if they are available,
-        * otherwise use 2MB pages.
+        * otherwise use 2MB pages.  Note that the unused parts of
+        * PTPs * must be zero outed, as they might be accessed due
+        * to speculative execution.  Also, PG_G is not allowed on
+        * non-leaf PTPs.
         */
 
        lastpa = 0;



Home | Main Index | Thread Index | Old Index