summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke/interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/booke/interrupt.c')
-rw-r--r--sys/powerpc/booke/interrupt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/booke/interrupt.c b/sys/powerpc/booke/interrupt.c
index 01ee3d9..2367bf9 100644
--- a/sys/powerpc/booke/interrupt.c
+++ b/sys/powerpc/booke/interrupt.c
@@ -118,9 +118,11 @@ powerpc_decr_interrupt(struct trapframe *framep)
struct thread *td;
td = PCPU_GET(curthread);
+ critical_enter();
atomic_add_int(&td->td_intr_nesting_level, 1);
decr_intr(framep);
atomic_subtract_int(&td->td_intr_nesting_level, 1);
+ critical_exit();
}
/*
@@ -129,10 +131,8 @@ powerpc_decr_interrupt(struct trapframe *framep)
void
powerpc_extr_interrupt(struct trapframe *framep)
{
- struct thread *td;
- td = PCPU_GET(curthread);
- atomic_add_int(&td->td_intr_nesting_level, 1);
+ critical_enter();
PIC_DISPATCH(pic, framep);
- atomic_subtract_int(&td->td_intr_nesting_level, 1);
+ critical_exit();
}
OpenPOWER on IntegriCloud