From 080d581a20e7a1930c313908223deef7e833af48 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 4 Dec 2004 05:56:28 +0000 Subject: [PATCH] Make sure to enable interrupts before lower IPL so we don't block any interrupts (IPI) we shouldn't. --- sys/arch/powerpc/powerpc/locore_subr.S | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/arch/powerpc/powerpc/locore_subr.S b/sys/arch/powerpc/powerpc/locore_subr.S index 2a726424d46d..c08cf837a090 100644 --- a/sys/arch/powerpc/powerpc/locore_subr.S +++ b/sys/arch/powerpc/powerpc/locore_subr.S @@ -1,4 +1,4 @@ -/* $NetBSD: locore_subr.S,v 1.25 2004/07/09 22:00:46 matt Exp $ */ +/* $NetBSD: locore_subr.S,v 1.26 2004/12/04 05:56:28 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -164,10 +164,10 @@ ASENTRY(Idle) bl _C_LABEL(sched_unlock_idle) #endif - li %r3,0 /* go IPL_SCHED to IPL_NONE */ - bl _C_LABEL(lcsplx) - mr %r31,%r3 /* save returned IPL mask */ - + /* + * Re-enable interrupts before lowering IPL so we won't + * block them when we shouldn't. + */ #if defined(PPC_IBM4XX) wrteei 1 /* reenable ints again */ #else /* PPC_OEA */ @@ -177,6 +177,10 @@ ASENTRY(Idle) isync #endif + li %r3,0 /* go IPL_SCHED to IPL_NONE */ + bl _C_LABEL(lcsplx) + mr %r31,%r3 /* save returned IPL mask */ + /* * At this point, other routines can be called (such as uvm_pageidlezero). */