From: Philippe Gerum <rpm@xenomai.org>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Handling PCI MSI interrupts
Date: Wed, 15 Feb 2006 21:09:02 +0100 [thread overview]
Message-ID: <43F38A5E.9030402@domain.hid> (raw)
In-Reply-To: <fd6a47a90602151034q8ed6920r@domain.hid>
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.
next prev parent reply other threads:[~2006-02-15 20:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-14 15:44 [Xenomai-core] Handling PCI MSI interrupts Jeroen Van den Keybus
2006-02-14 17:50 ` Philippe Gerum
2006-02-14 18:07 ` Jeroen Van den Keybus
2006-02-14 18:17 ` Jan Kiszka
2006-02-14 18:26 ` Philippe Gerum
2006-02-14 18:52 ` Jeroen Van den Keybus
2006-02-14 19:22 ` Jeroen Van den Keybus
2006-02-14 19:33 ` Jeroen Van den Keybus
2006-02-14 21:41 ` Jeroen Van den Keybus
2006-02-14 21:56 ` Philippe Gerum
2006-02-15 11:00 ` Jeroen Van den Keybus
2006-02-15 18:02 ` Jeroen Van den Keybus
2006-02-15 18:34 ` Jeroen Van den Keybus
2006-02-15 20:09 ` Philippe Gerum [this message]
2006-02-15 20:50 ` Jeroen Van den Keybus
2006-02-15 22:48 ` Philippe Gerum
2006-02-15 22:58 ` Jeroen Van den Keybus
2006-02-15 23:09 ` Russell Johnson
2006-02-16 9:36 ` Philippe Gerum
2006-02-16 14:23 ` Russell Johnson
2006-02-17 12:54 ` Jeroen Van den Keybus
2006-02-17 13:08 ` Philippe Gerum
2006-02-17 14:43 ` Russell Johnson
2006-02-17 15:45 ` Philippe Gerum
2006-02-17 15:57 ` Jeroen Van den Keybus
2006-02-17 16:07 ` Philippe Gerum
2006-02-17 16:49 ` Jeroen Van den Keybus
2006-02-17 18:37 ` Jeroen Van den Keybus
2006-02-17 18:39 ` Philippe Gerum
2006-02-19 18:50 ` Philippe Gerum
2006-02-14 18:23 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43F38A5E.9030402@domain.hid \
--to=rpm@xenomai.org \
--cc=jeroen.vandenkeybus@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.