From 7e90b114e30399ce713a2dcdacb93865417eac34 Mon Sep 17 00:00:00 2001 From: yar Date: Tue, 20 Jun 2006 12:44:21 +0000 Subject: We no longer need to disable interrupts in MD trap machinery when we're about to call kdb_trap() because the latter MI function can disable interrupts by itself now. Pointed out by: bde X-MFC remark: depends on kern/subr_kdb.c#1.18 Sponsored by: RiNet (Cronyx Plus LLC) --- sys/amd64/amd64/trap.c | 10 ++-------- sys/i386/i386/trap.c | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 9036317..d41318c 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -681,15 +681,9 @@ trap_fatal(frame, eva) } #ifdef KDB - if (debugger_on_panic || kdb_active) { - register_t rflags; - rflags = intr_disable(); - if (kdb_trap(type, 0, frame)) { - intr_restore(rflags); + if (debugger_on_panic || kdb_active) + if (kdb_trap(type, 0, frame)) return; - } - intr_restore(rflags); - } #endif printf("trap number = %d\n", type); if (type <= MAX_TRAP_MSG) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 47a94fd..cce7038 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -856,16 +856,12 @@ trap_fatal(frame, eva) #ifdef KDB if (debugger_on_panic || kdb_active) { - register_t eflags = intr_disable(); - frame->tf_err = eva; /* smuggle fault address to ddb */ if (kdb_trap(type, 0, frame)) { frame->tf_err = code; /* restore error code */ - intr_restore(eflags); return; } frame->tf_err = code; /* restore error code */ - intr_restore(eflags); } #endif printf("trap number = %d\n", type); -- cgit v1.1