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 In e500_spl0, grab ci after disabling...



details:   https://anonhg.NetBSD.org/src/rev/806fb346ffcc
branches:  trunk
changeset: 766371:806fb346ffcc
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Jun 21 06:24:25 2011 +0000

description:
In e500_spl0, grab ci after disabling interrupts.
Consolidate a KASSERT.

diffstat:

 sys/arch/powerpc/booke/e500_intr.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (34 lines):

diff -r 88128d61d762 -r 806fb346ffcc sys/arch/powerpc/booke/e500_intr.c
--- a/sys/arch/powerpc/booke/e500_intr.c        Tue Jun 21 06:23:38 2011 +0000
+++ b/sys/arch/powerpc/booke/e500_intr.c        Tue Jun 21 06:24:25 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: e500_intr.c,v 1.11 2011/06/15 15:11:50 matt Exp $      */
+/*     $NetBSD: e500_intr.c,v 1.12 2011/06/21 06:24:25 matt Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -454,11 +454,8 @@
        u_int ctpr = (ipl >= IPL_VM ? 15 : ipl);
        KASSERT(openpic_read(cpu, OPENPIC_CTPR) == old_ctpr);
 #else
-#ifdef DIAGNOSTIC
-       u_int old_ctpr = IPL2CTPR(ci->ci_cpl);
-#endif
        u_int ctpr = IPL2CTPR(ipl);
-       KASSERT(openpic_read(cpu, OPENPIC_CTPR) == old_ctpr);
+       KASSERT(openpic_read(cpu, OPENPIC_CTPR) == IPL2CTPR(ci->ci_cpl));
 #endif
        openpic_write(cpu, OPENPIC_CTPR, ctpr);
        KASSERT(openpic_read(cpu, OPENPIC_CTPR) == ctpr);
@@ -468,9 +465,9 @@
 static void
 e500_spl0(void)
 {
-       struct cpu_info * const ci = curcpu();
+       wrtee(0);
 
-       wrtee(0);
+       struct cpu_info * const ci = curcpu();
 
 #ifdef __HAVE_FAST_SOFTINTS
        if (__predict_false(ci->ci_data.cpu_softints != 0)) {



Home | Main Index | Thread Index | Old Index