diff --git a/sys/arch/arm32/arm32/fault.c b/sys/arch/arm32/arm32/fault.c index bf57cea7c974..afe467fa8f15 100644 --- a/sys/arch/arm32/arm32/fault.c +++ b/sys/arch/arm32/arm32/fault.c @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.42 1999/04/06 06:35:03 mark Exp $ */ +/* $NetBSD: fault.c,v 1.43 1999/05/05 22:06:15 mycroft Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -149,6 +149,15 @@ data_abort_handler(frame) u_quad_t sticks = 0; int error; + /* + * Must get fault address and status from the CPU before + * re-enabling interrupts. (Interrupt handlers may take + * R/M emulation faults.) + */ + fault_address = cpu_faultaddress(); + fault_status = cpu_faultstatus(); + fault_pc = frame->tf_pc; + /* * Enable IRQ's (disabled by CPU on abort) if trapframe * shows they were enabled. @@ -159,11 +168,6 @@ data_abort_handler(frame) /* Update vmmeter statistics */ uvmexp.traps++; - /* Get fault address and status from the CPU */ - fault_address = cpu_faultaddress(); - fault_status = cpu_faultstatus(); - fault_pc = frame->tf_pc; - /* Extract the fault code from the fault status */ fault_code = fault_status & FAULT_TYPE_MASK;