All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Error propagating ISR to Linux domain
@ 2008-07-16 16:03 Benjamin ZORES
  2008-07-16 17:02 ` Jan Kiszka
  2008-07-20 16:25 ` Ulrich Schwab
  0 siblings, 2 replies; 10+ messages in thread
From: Benjamin ZORES @ 2008-07-16 16:03 UTC (permalink / raw)
  To: xenomai-core

Hi,

I've encountered a little problem when trying to propagate an ISR from 
Xenomai to Linux context.

To sum up clearly, I'm writing an RT kernel module that drives a PCI card.
I've registered a nucleus ISR handler on the IRQ attributed to this card.

On some systems, this IRQ is dedicated to this PCI card only.
Though, on others, it is shared with other peripherals.
Hence, I need to forward/propagate this IRQ to Linux domain for other 
drivers to handle it
when the IRQ has not been initiated by my PCI card.

My RT ISR code looks like the following:

int my_isr_handler (xnintr_t *irq)
{
    ... /* handling */
   return XN_ISR_HANDLED | XN_ISR_PROPAGATE;
}

While this code works perfectly when the IRQ number is really shared 
among peripherals,
when I use it on system where this IRQ is dedicated to RT only (i.e. not 
used by Linux),
then, the IRQ is never acknowledged.

In other words, I see a bug when returning XN_ISR_PROPAGATE on a system 
where
no Linux driver has registered a handler for this IRQ.
Is this something known and is there some workaround (I'm using 2.6.23 + 
lastest Adeos + Xenomai 2.4.4 on x86_32) ???

A quick and dirty workaround is to create a dummy Linux IRQ handler 
(doing so acknowledge my propagated IRQ) but:
 - if it returns IRQ_NONE, then Linux discard the IRQ line after having 
missed 100000 of them (on system where the IRQ is dedicated)
 - if it returns IRQ_HANDLED, then I have no guarantee that this dumym 
handler won't get called before the legacy drivers that need it.

Or maybe there is a way in Xenomai to know that any subdomain (like 
Linux) has registered a handler for this given IRQ ??

Any help would be appreciated,

Ben


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-07-30  9:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 16:03 [Xenomai-core] Error propagating ISR to Linux domain Benjamin ZORES
2008-07-16 17:02 ` Jan Kiszka
2008-07-20 16:25 ` Ulrich Schwab
2008-07-28 14:37   ` Gilles Chanteperdrix
2008-07-29 14:20     ` Gilles Chanteperdrix
2008-07-29 22:15       ` Ulrich Schwab
2008-07-29 22:24         ` Gilles Chanteperdrix
2008-07-30  8:31         ` Gilles Chanteperdrix
2008-07-30  9:22           ` Ulrich Schwab
2008-07-30  9:26             ` Gilles Chanteperdrix

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.