Module Name:    src
Committed By:   matt
Date:           Tue Jun 21 06:24:25 UTC 2011

Modified Files:
        src/sys/arch/powerpc/booke: e500_intr.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/e500_intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.11 src/sys/arch/powerpc/booke/e500_intr.c:1.12
--- src/sys/arch/powerpc/booke/e500_intr.c:1.11	Wed Jun 15 15:11:50 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Tue Jun 21 06:24:25 2011
@@ -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,10 +465,10 @@
 static void
 e500_spl0(void)
 {
-	struct cpu_info * const ci = curcpu();
-
 	wrtee(0);
 
+	struct cpu_info * const ci = curcpu();
+
 #ifdef __HAVE_FAST_SOFTINTS
 	if (__predict_false(ci->ci_data.cpu_softints != 0)) {
 		e500_splset(ci, IPL_HIGH);

Reply via email to