Skip to contentSkip to conversation

Shared interrupt usage questions

Xenomai-help Steve Deiters 2 participants 2 messages Aug 18, 2009 – Aug 25, 2009

lore
Share & tools
lore
#0 lore raw

Is there any acceptable method to share interrupts in userspace using the native or other skin? I am writing a userspace driver for a Freescale mpc5121e PSC serial controller, which has 12 programmable serial controllers which share a single FIFO controller. The single FIFO controller has only a single IRQ line for all 12 PSCs. This is further complicated by the fact that I also have to share this IRQ line with the Linux domain, as it uses it for the console and other devices.

I cannot create multiple descriptors for the same IRQ line using rt_intr_create and the I_SHARED flag doesn't seem to be exported to userspace. Is it valid to create one interrupt object and have multiple tasks call rt_intr_wait for the same interrupt object?

As far as sharing with the Linux domain, from the documentation it seems I would just pass I_PROPAGATE and this should then be transparent to the Linux domain. Are there additional concerns I should be aware of with sharing the IRQ between domains?

I have set this up with a single shared interrupt object and it seems to function properly. I just want to make sure I'm not putting myself in a condition where I could get some obscure race condition or have a deadlocked interrupt server task.

Thanks.

#1 lore raw
Quoted 18 lines · Steve Deiters

Is there any acceptable method to share interrupts in userspace using the native or other skin? I am writing a userspace driver for a Freescale mpc5121e PSC serial controller, which has 12 programmable serial controllers which share a single FIFO controller. The single FIFO controller has only a single IRQ line for all 12 PSCs. This is further complicated by the fact that I also have to share this IRQ line with the Linux domain, as it uses it for the console and other devices.

I cannot create multiple descriptors for the same IRQ line using rt_intr_create and the I_SHARED flag doesn't seem to be exported to userspace. Is it valid to create one interrupt object and have multiple tasks call rt_intr_wait for the same interrupt object?

As far as sharing with the Linux domain, from the documentation it seems I would just pass I_PROPAGATE and this should then be transparent to the Linux domain. Are there additional concerns I should be aware of with sharing the IRQ between domains?

Quoted 6 lines

I have set this up with a single shared interrupt object and it seems to function properly. I just want to make sure I'm not putting myself in a condition where I could get some obscure race condition or have a deadlocked interrupt server task.

Thanks.

I_PROPAGATE does not help resolving the IRQ sharing problem reliably. See
http://www.xenomai.org/index.php/FAQs#What_can_I_do_if_Xenomai_and_Linux_devices_share_the_same_IRQ.3F
for more information and browse the mailing list archives.

Jan