Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/booke If we paniced because a watchdog time...



details:   https://anonhg.NetBSD.org/src/rev/18de7aef28c6
branches:  trunk
changeset: 780048:18de7aef28c6
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 09 11:40:19 2012 +0000

description:
If we paniced because a watchdog timed out, PSL_CE will be clear.  So don't
assert PSL_CE is set if panicstr is not NULL.

diffstat:

 sys/arch/powerpc/booke/e500_intr.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 5decd6049886 -r 18de7aef28c6 sys/arch/powerpc/booke/e500_intr.c
--- a/sys/arch/powerpc/booke/e500_intr.c        Mon Jul 09 11:20:22 2012 +0000
+++ b/sys/arch/powerpc/booke/e500_intr.c        Mon Jul 09 11:40:19 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: e500_intr.c,v 1.17 2012/06/08 23:35:23 matt Exp $      */
+/*     $NetBSD: e500_intr.c,v 1.18 2012/07/09 11:40:19 matt Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 #define __INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.17 2012/06/08 23:35:23 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.18 2012/07/09 11:40:19 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -491,7 +491,8 @@
        struct cpu_info * const ci = curcpu();
        const int old_ipl = ci->ci_cpl;
 
-       KASSERT(mfmsr() & PSL_CE);
+       /* if we paniced because of watchdog, PSL_CE will be clear.  */
+       KASSERT(panicstr != NULL || (mfmsr() & PSL_CE));
 
        if (ipl == old_ipl)
                return;
@@ -527,7 +528,8 @@
        struct cpu_info * const ci = curcpu();
        const int old_ipl = ci->ci_cpl;
 
-       KASSERT(mfmsr() & PSL_CE);
+       /* if we paniced because of watchdog, PSL_CE will be clear.  */
+       KASSERT(panicstr != NULL || (mfmsr() & PSL_CE));
 
        if (old_ipl < ipl) {
                //const
@@ -814,7 +816,8 @@
        struct cpu_softc * const cpu = ci->ci_softc;
        const int old_ipl = ci->ci_cpl;
 
-       KASSERT(mfmsr() & PSL_CE);
+       /* if we paniced because of watchdog, PSL_CE will be clear.  */
+       KASSERT(panicstr != NULL || (mfmsr() & PSL_CE));
 
 #if 0
 //     printf("%s(%p): idepth=%d enter\n", __func__, tf, ci->ci_idepth);



Home | Main Index | Thread Index | Old Index