Skip to contentSkip to conversation

pasemi: Fix NMI handling check

PATCH New Olof Johansson 1 participant 1 message Jan 2, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pasemi: Fix NMI handling check

[POWERPC] pasemi: Fix NMI handling check

The logic that checks to see if a machine check is caused by an NMI will always match when NMI hasn't been initialized, since the mpic routine will return NO_IRQ (and that's what the nmi_virq value is as well).

arch/powerpc/platforms/pasemi/setup.c +1 -1
index 1940e67..a89d098 100644
@@ -264,7 +264,7 @@ static int pas_machine_check_handler(struct pt_regs *regs)
 	srr0 = regs->nip;
 	srr1 = regs->msr;
 
-	if (mpic_get_mcirq() == nmi_virq) {
+	if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
 		printk(KERN_ERR "NMI delivered\n");
 		debugger(regs);
 		mpic_end_irq(nmi_virq);