All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Feretich <bob.feretich@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Having trouble with a BeagleBoard GPIO interrupt pin
Date: Tue, 10 Aug 2010 00:18:15 -0700	[thread overview]
Message-ID: <4C60FD37.20309@domain.hid> (raw)
In-Reply-To: <1281422621.2986.39.camel@domain.hid>



On 8/9/2010 11:43 PM, Philippe Gerum wrote:
... snipped...
>> Do you see any problem with me continuing with the above temp fix?
> No, because you only use request_irq() to set up the GPIO line properly,
> but you don't actually share the interrupt between linux and Xenomai,
> which is ok.
Great. I'll continue my debug.
>
>> It would also help if you could better describe the meaning of the
>> rtdm_irq_request() flags and whether the Linux request_irq() flags
>> have any implications to Adeos.
> They have none. The edge flag is purely Xenomai-related. When shared IRQ
> support is enabled, the EDGE flags passed to rtdm_irq_request() just
> gives a hint to the Xenomai interrupt dispatcher for dealing with edge
> interrupt handlers properly.
Then I should code the rtdm_irq_request() SHARE flag if I want to share 
an interrupt with another rtdm driver and, as you state below, rtdm IRQs 
must never be shared with Linux drivers.
Then IRQ37 [timer] must be a special case. It seems to be shared by both 
environments.

Then it would be best if I always code the EDGE flag for edge triggered 
interrupts (whether rising edge or falling edge). If the IRQ is shared, 
its a useful hint, and if the IRQ is not shared, the flag is ignored.
>> For example, I was quite surprised that both the request_irq() and
>> rtdm_irq_request() to the same IRQ succeeded even though neither
>> included a SHARE flag. This seems to require a rt driver to call both
>> routines to protect its xxxDetect registers.
> This is a current flaw in the Xenomai interrupt management routines;
> they should allow the IRQ trigger info to be defined when requesting an
> IRQ (via rtdm_irq_request) the same way request_irq() does on the linux
> side, but they do not support this yet.
Let me know when you have a proposed fix. I'm willing to test it on 
OMAP3 for you.
> request_irq and rtdm_irq_request are not supposed to work together; IRQ
> sharing between linux and Xenomai is not formally defined, because it is
> semantically wrong. Actually, a real-time interrupt hooked via
> rtdm_irq_request should not be grabbed via request_irq() at the same
> time for handling the IRQ. This would mean that both linux and the rt
> domain share that interrupt, which would introduce a flaw, since a
> dependency would exist between the non-rt linux handling and the rt
> handling of the same IRQ. Think of a level-triggered IRQ, requiring
> linux to handle it before it is unmasked anew. To prevent an interrupt
> storm, the rt domain would then have to wait for the non-rt one (i.e.
> linux) to unmask the interrupt channel (i.e. maybe a non-rt device is
> requiring attention), thus introducing an unbounded latency.
Thanks for your help.

Regards,
Bob Feretich



      reply	other threads:[~2010-08-10  7:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09  9:54 [Xenomai-help] Having trouble with a BeagleBoard GPIO interrupt pin Bob Feretich
2010-08-09 10:34 ` Philippe Gerum
2010-08-09 11:50   ` Gilles Chanteperdrix
2010-08-09 13:27     ` Philippe Gerum
2010-08-09 13:37     ` Philippe Gerum
2010-08-09 14:08       ` Gilles Chanteperdrix
2010-08-09 17:19       ` Gilles Chanteperdrix
2010-08-10  5:35         ` [Xenomai-core] " Philippe Gerum
2010-08-10  6:22           ` Bob Feretich
2010-08-10  6:43             ` [Xenomai-core] " Philippe Gerum
2010-08-10  7:18               ` Bob Feretich [this message]

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=4C60FD37.20309@domain.hid \
    --to=bob.feretich@domain.hid \
    --cc=rpm@xenomai.org \
    --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.