From 42cfa2cc9eb59ddbe448a8b539720b20fb70fad9 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 6 Jan 2006 18:02:12 +0000 Subject: Fix various places that were testing td_critnest to see if interrupts should remain disabled during a trap or not to check td_md.md_spinlock_count instead. --- sys/arm/arm/trap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arm') diff --git a/sys/arm/arm/trap.c b/sys/arm/arm/trap.c index f858af0..d8620c3 100644 --- a/sys/arm/arm/trap.c +++ b/sys/arm/arm/trap.c @@ -269,7 +269,8 @@ data_abort_handler(trapframe_t *tf) /* Grab the current pcb */ pcb = td->td_pcb; /* Re-enable interrupts if they were enabled previously */ - if (td->td_critnest == 0 && __predict_true(tf->tf_spsr & I32_bit) == 0) + if (td->td_md.md_spinlock_count == 0 && + __predict_true(tf->tf_spsr & I32_bit) == 0) enable_interrupts(I32_bit); /* Invoke the appropriate handler, if necessary */ @@ -729,7 +730,7 @@ prefetch_abort_handler(trapframe_t *tf) thread_user_enter(td); } fault_pc = tf->tf_pc; - if (td->td_critnest == 0 && + if (td->td_md.md_spinlock_count == 0 && __predict_true((tf->tf_spsr & I32_bit) == 0)) enable_interrupts(I32_bit); @@ -1007,7 +1008,7 @@ swi_handler(trapframe_t *frame) * Since all syscalls *should* come from user mode it will always * be safe to enable them, but check anyway. */ - if (td->td_critnest == 0 && !(frame->tf_spsr & I32_bit)) + if (td->td_md.md_spinlock_count == 0 && !(frame->tf_spsr & I32_bit)) enable_interrupts(I32_bit); syscall(td, frame, insn); -- cgit v1.1