Skip to contentSkip to conversation

fix the irq migration

PATCH In review Siddha, Suresh B 2 participants 2 messages Feb 23, 2007 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix the irq migration

While debugging some other irq migration issue, observed this issue with -git kernels. Ingo, please ACK it.
---

With the commit 76d2160147f43f982dfe881404cfde9fd0a9da21, irq_chip default_disable() became an empty function. And with this change, irq migration in the case of Edge triggered IO-APIC and MSI interrupts happens with out masking the irq.

Appended patch fixes by using the mask/unmask handlers of irq_chip directly while doing the irq migration.

---

kernel/irq/migration.c +2 -2
index 4baa3bb..14ff345 100644
@@ -66,11 +66,11 @@ void move_native_irq(int irq)
 		return;
 
 	if (likely(!(desc->status & IRQ_DISABLED)))
-		desc->chip->disable(irq);
+		desc->chip->mask(irq);
 
 	move_masked_irq(irq);
 
 	if (likely(!(desc->status & IRQ_DISABLED)))
-		desc->chip->enable(irq);
+		desc->chip->unmask(irq);
 }
 
#1 lore raw
Quoted 11 lines · Suresh B

While debugging some other irq migration issue, observed this issue with -git kernels. Ingo, please ACK it.
---

With the commit 76d2160147f43f982dfe881404cfde9fd0a9da21, irq_chip default_disable() became an empty function. And with this change, irq migration in the case of Edge triggered IO-APIC and MSI interrupts happens with out masking the irq.

Appended patch fixes by using the mask/unmask handlers of irq_chip directly while doing the irq migration.

Close.

If the irq is disabled we need to bail out instead of skipping the masking.

The masking is required for the function to run correctly and when IRQ_DISABLED is set we don't know enough to do anything.

Once this is fixed we just need to fix the msi case where the hardware doesn't provide a mask bit.

Eric