Source-Changes-HG archive

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

[src/rmind-uvmplock]: src/sys/arch/x86/x86 pmap_tlb_shootdown: add assert dem...



details:   https://anonhg.NetBSD.org/src/rev/e5b3a892cc26
branches:  rmind-uvmplock
changeset: 753065:e5b3a892cc26
user:      rmind <rmind%NetBSD.org@localhost>
date:      Fri Jul 02 02:11:21 2010 +0000

description:
pmap_tlb_shootdown: add assert demonstrating assumption.

diffstat:

 sys/arch/x86/x86/pmap_tlb.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 1954563569bd -r e5b3a892cc26 sys/arch/x86/x86/pmap_tlb.c
--- a/sys/arch/x86/x86/pmap_tlb.c       Fri Jul 02 02:09:54 2010 +0000
+++ b/sys/arch/x86/x86/pmap_tlb.c       Fri Jul 02 02:11:21 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_tlb.c,v 1.1.2.2 2010/05/31 01:12:14 rmind Exp $   */
+/*     $NetBSD: pmap_tlb.c,v 1.1.2.3 2010/07/02 02:11:21 rmind Exp $   */
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.1.2.2 2010/05/31 01:12:14 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.1.2.3 2010/07/02 02:11:21 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -172,7 +172,11 @@
         */ 
        s = splvm();
        tp = (struct pmap_tlb_packet *)curcpu()->ci_pmap_data;
+
+       /* Whole address flush will be needed if PG_G is set. */
+       CTASSERT(PG_G == (uint16_t)PG_G);
        tp->tp_pte |= (uint16_t)pte;
+
        if (tp->tp_count < TP_MAXVA && va != (vaddr_t)-1LL) {
                /* Flush a single page. */
                tp->tp_va[tp->tp_count++] = va;



Home | Main Index | Thread Index | Old Index