[PATCH for review] [135/145] x86_64: wire up oops_enter()/oops_exit()

From: Andi Kleen
Date: Thu Aug 10 2006 - 15:41:08 EST


r

From: Andrew Morton <akpm@xxxxxxxx>

Implement pause_on_oops() on x86_64.

AK: I redid the patch to do the oops_enter/exit in the existing
oops_begin()/end(). This makes it much shorter.

Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxx>

---

arch/x86_64/kernel/traps.c | 4 ++++
1 files changed, 4 insertions(+)

Index: linux/arch/x86_64/kernel/traps.c
===================================================================
--- linux.orig/arch/x86_64/kernel/traps.c
+++ linux/arch/x86_64/kernel/traps.c
@@ -559,6 +559,8 @@ unsigned __kprobes long oops_begin(void)
int cpu = safe_smp_processor_id();
unsigned long flags;

+ oops_enter();
+
/* racy, but better than risking deadlock. */
local_irq_save(flags);
if (!spin_trylock(&die_lock)) {
@@ -587,6 +589,8 @@ void __kprobes oops_end(unsigned long fl
spin_unlock_irqrestore(&die_lock, flags);
if (panic_on_oops)
panic("Fatal exception: panic_on_oops");
+
+ oops_exit();
}

void __kprobes __die(const char * str, struct pt_regs * regs, long err)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/