[PATCH][2.5] do_nmi needs irq_enter/irq_exit lovin...

Zwane Mwaikambo (zwane@holomorphy.com)
Sat, 9 Nov 2002 00:34:08 -0500 (EST)


You don't even want to see the oops ;) But there is some more work
required before this will all work. I'll require your comments on a few
more incoming patches.

Index: linux-2.5.46-bochs/arch/i386/kernel/traps.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.46/arch/i386/kernel/traps.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 traps.c
--- linux-2.5.46-bochs/arch/i386/kernel/traps.c 5 Nov 2002 01:47:29 -0000 1.1.1.1
+++ linux-2.5.46-bochs/arch/i386/kernel/traps.c 9 Nov 2002 04:45:07 -0000
@@ -528,10 +528,14 @@
{
int cpu = smp_processor_id();

+ irq_enter();
+
++nmi_count(cpu);

if (!nmi_callback(regs, cpu))
default_do_nmi(regs);
+
+ irq_exit();
}

void set_nmi_callback(nmi_callback_t callback)

-- 
function.linuxpower.ca

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/