Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Tweak the KASSERTs in pmap_update in the ...



details:   https://anonhg.NetBSD.org/src/rev/27bd92f8ed17
branches:  trunk
changeset: 341599:27bd92f8ed17
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Nov 13 08:04:21 2015 +0000

description:
Tweak the KASSERTs in pmap_update in the ARM_MMU_EXTENDED case - Lazy
updating is not done on the kernel pmap.

PR port-arm/50420: curcpu()->ci_pmap_cur != pm || pm->pm_pai[0].pai_asid == curcpu()->ci_pmap_asid_cur" failed

diffstat:

 sys/arch/arm/arm32/pmap.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r acf14569ea09 -r 27bd92f8ed17 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Fri Nov 13 07:55:18 2015 +0000
+++ b/sys/arch/arm/arm32/pmap.c Fri Nov 13 08:04:21 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.329 2015/11/13 07:55:18 skrll Exp $ */
+/*     $NetBSD: pmap.c,v 1.330 2015/11/13 08:04:21 skrll Exp $ */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -217,7 +217,7 @@
 
 #include <arm/locore.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.329 2015/11/13 07:55:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.330 2015/11/13 08:04:21 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -5009,6 +5009,8 @@
 
        if (pm->pm_remove_all) {
 #ifdef ARM_MMU_EXTENDED
+               KASSERT(pm != pmap_kernel());
+
                KASSERTMSG(curcpu()->ci_pmap_cur != pm
                    || pm->pm_pai[0].pai_asid == curcpu()->ci_pmap_asid_cur,
                    "pmap/asid %p/%#x != %s cur pmap/asid %p/%#x", pm,
@@ -5042,8 +5044,8 @@
                PMAP_COUNT(shootdown_ipis);
        }
 #endif
-
-       KASSERTMSG(curcpu()->ci_pmap_cur != pm
+       KASSERTMSG(pm == pmap_kernel()
+           || curcpu()->ci_pmap_cur != pm
            || pm->pm_pai[0].pai_asid == curcpu()->ci_pmap_asid_cur,
            "pmap/asid %p/%#x != %s cur pmap/asid %p/%#x", pm,
            pm->pm_pai[0].pai_asid, curcpu()->ci_data.cpu_name,



Home | Main Index | Thread Index | Old Index