Jeroen Van den Keybus wrote:
Ok. I´ve found it. The MSI interrupt type uses its end() handler to acknowledge the interrupt using ack_APIC_irq() (drivers/pci/msi.c). Xenomai uses the ack() handler to expedite the acknowledgement of an IRQ. In case of MSI, ack() is a NOP.

The main problem is that Xenomai redefines ack_APIC_irq() calls (they become NOPs, as defined in apic.h). Maybe the ISRs used so far never issued ack_APIC_irq() themselves, and used always the IO-APIC (which contains the correct __ack_APIC_irq() call) ?


Really good spot, I overlooked this issue in the MSI support; thanks for 
digging it.

I feel a bit awkward about changing msi.c .

Any opinions about how to change Xenomai / Linux ?


It's definitely an Adeos issue and msi.c needs fixing. What about this patch, do things improve with it (against 2.6.15-ipipe-1.2-00)?

--- msi.c~      2006-01-03 04:21:10.000000000 +0100
+++ msi.c       2006-02-15 21:02:03.000000000 +0100
@@ -149,6 +149,15 @@
        msi_set_mask_bit(vector, 0);
 }

+#ifdef CONFIG_IPIPE
+static void ack_MSI_irq(unsigned int vector)
+{
+    __ack_APIC_irq();
+}
+#else /* !CONFIG_IPIPE */
+#define ack_MSI_irq  mask_MSI_irq
+#endif /* CONFIG_IPIPE */
+
 static unsigned int startup_msi_irq_wo_maskbit(unsigned int vector)
 {
        struct msi_desc *entry;
@@ -212,7 +221,7 @@
        .shutdown       = shutdown_msi_irq,
        .enable         = unmask_MSI_irq,
        .disable        = mask_MSI_irq,
-       .ack            = mask_MSI_irq,
+       .ack            = ack_MSI_irq,
        .end            = end_msi_irq_w_maskbit,
        .set_affinity   = set_msi_irq_affinity
 };
@@ -228,7 +237,7 @@
        .shutdown       = shutdown_msi_irq,
        .enable         = unmask_MSI_irq,
        .disable        = mask_MSI_irq,
-       .ack            = mask_MSI_irq,
+       .ack            = ack_MSI_irq,
        .end            = end_msi_irq_w_maskbit,
        .set_affinity   = set_msi_irq_affinity
 };

--

Philippe.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to