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

Andi Kleen
2006-08-10T19:43:01Z

r

From: Andrew Morton <akpm@osdl.org>

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@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>

---

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)