All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Defensive IRQ allocation procedure.
@ 2009-05-04 19:04 Martin Shepherd
  2009-05-04 19:49 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Shepherd @ 2009-05-04 19:04 UTC (permalink / raw)
  To: xenomai

Am I correct in believing that an RTDM driver can safely call
request_irq() from its non-realtime ioctl_nr() callback? I want to do
this to verify that a non-realtime driver isn't using the same IRQ as
my realtime device, before I attempt to use it in my RTDM driver, and
as well as to prevent any non-realtime drivers from allocating that
IRQ once I have started to use it. I can't do this at module
initialization time, because I don't know which of our identical
digital I/O boards is connected to what, until I perform I/O to them,
and not all of them need interrupts.

Thanks,

Martin


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

* Re: [Xenomai-help] Defensive IRQ allocation procedure.
  2009-05-04 19:04 [Xenomai-help] Defensive IRQ allocation procedure Martin Shepherd
@ 2009-05-04 19:49 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2009-05-04 19:49 UTC (permalink / raw)
  To: Martin Shepherd; +Cc: xenomai

Martin Shepherd wrote:
> Am I correct in believing that an RTDM driver can safely call
> request_irq() from its non-realtime ioctl_nr() callback? I want to do
> this to verify that a non-realtime driver isn't using the same IRQ as
> my realtime device, before I attempt to use it in my RTDM driver, and
> as well as to prevent any non-realtime drivers from allocating that
> IRQ once I have started to use it. I can't do this at module
> initialization time, because I don't know which of our identical
> digital I/O boards is connected to what, until I perform I/O to them,
> and not all of them need interrupts.

Yes, this should work. Note however, that request_irq will work even if
there is another irq handler registered with IRQF_SHARED, and you pass
IRQF_SHARED too.

-- 
					    Gilles.


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

end of thread, other threads:[~2009-05-04 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 19:04 [Xenomai-help] Defensive IRQ allocation procedure Martin Shepherd
2009-05-04 19:49 ` 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.