------- Original Message -------
On Monday, February 7th, 2022 at 1:21 AM, Jan Kiszka <jan.kis...@siemens.com> 
wrote:
> On 02.02.22 17:12, Jeff Webb via Xenomai wrote:
>
> > I am updating and reworking a UDD driver stub and happened to notice a 
> > difference
> > between the UDD and UIO APIs. It looks like udd_register_device() always 
> > passes "0"
> > as the rtdm_irq_request() "flags" argument, whereas uio_register_device() 
> > allows
> > flags to be passed in to request_irq(). Does this mean that shared 
> > interrupts are
> > not currently possible with UDD drivers? Is there a reason for this 
> > difference in
> > the UDD and UIO APIs?
>
> You can add RTDM_IRQTYPE_SHARED as flag - but note that this will only
> give you sharing between RT devices. Cross-domain sharing would break
> determinism.
>
> Jan

Thanks for confirming that there is nothing preventing shared interrupts 
(between real-time drivers) from working with UDD, Jan.

I think my question was not completely clear, though, so let me try again.

I realize that I could modify the source of udd.c to add RTDM_IRQTYPE_SHARED in 
place of "0" in the excerpt of udd_register_device() below:

                ret = rtdm_irq_request(&ur->irqh, udd->irq,
                                       udd_irq_handler, 0,
                                       dev->name, udd);

I was wondering why there is not a way to pass in RTDM_IRQTYPE_SHARED to 
udd_register_device()?  Maybe no one has needed this yet?  I see that Linux 
UIO's uio_info struct has an irq_flags field for passing in IRQF_SHARED, which 
is passed along to request_irq(). Would it make sense to add a similar field to 
the udd_device structure for this purpose?

Thanks,

-Jeff


Reply via email to