support for sharing IRQs
Hi,
at the moment the 16550A UART driver that comes with Xenomai does not support IRQ sharing between serial ports or with other real-time devices. I first considered adding such support to the driver internally, but I think it's better work on a generic approach for Xenomai.
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler only in case sharing is actually practiced for a specific line. The IRQ API is just extended by a single flag (imagine RTDM_IRQ_SHARED) which is set upon registering an ISR that is capable of IRQ sharing. The semantic is the same as the kernel's SA_SHIRQ.
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but which way is desired? (I would vote for the nucleus...)
Jan
Hi Jan,
Quoted 5 lines
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler only in case sharing is actually practiced for a specific line.
Could you be a bit more specific on what is meant by "...sharing is actually practiced for a specific line"?
To my knowledge, the matter is only about whether a certain device (driver) permits the earlier obtained irq line to be shared with other devices. i.e. a driver [1] may succeed with an irq registration request in case another driver [2] already holds this line but both [1] and [2] have specified a SA_SHIRQ flag.
Quoted 4 lines
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but which way is desired? (I would vote for the nucleus...)
If we have a policy that all the drivers should be implemented on top of RTDM, then, it can be done there. If no (and I guess so), this feature should be common and I'd vote for the nucleus.
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
Quoted 3 lines
Jan
---
Best regards,
Dmitry
Quoted 9 lines · Dmitry Adamushko
Hi Jan,
Quoted 4 lines
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler only in case sharing is actually practiced for a specific line.
Could you be a bit more specific on what is meant by "...sharing is actually practiced for a specific line"?
Ok, one have to remind that my existing code is built on top of the non-sharing xnintr_xxx API. This means that I had to define a trampoline ISR which does the loop over all registered end-user ISRs. And this intermediate handler is only involved when A) the IRQ is sharable and B) there is actually more than one ISR registered for it.
This "smartness" becomes obsolete when we embed a doubly-linked list into xnintr_t and already iterate over it in xnintr_irq_handler().
Quoted 6 lines
To my knowledge, the matter is only about whether a certain device (driver) permits the earlier obtained irq line to be shared with other devices. i.e. a driver [1] may succeed with an irq registration request in case another driver [2] already holds this line but both [1] and [2] have specified a
SA_SHIRQflag.
Yep.
Quoted 10 lines
Quoted 6 lines
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but which way is desired? (I would vote for the nucleus...)
If we have a policy that all the drivers should be implemented on top of RTDM, then, it can be done there. If no (and I guess so), this feature should be common and I'd vote for the nucleus.
Drivers should be built over RTDM, that's true. But there may still be driver-like applications, also in user space that attach directly to the IRQs via the various skin APIs. I think it would be good to let them live side-by-side with RTDM drivers or other IRQ-using applications.
Quoted 3 lines
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a xnintr_t per IRQ. The xnintr_irq_handler() deals with things like re-enabling IRQs, rescheduling, etc.
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Jan
Quoted 14 lines · you
Quoted 3 lines · Dmitry Adamushko
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.
Quoted 3 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Let's take a look at what we have got currently:
[1] ipipe_domain::irqs[IPIPE_NR_IRQS] [ADEOS-IPIPE]
the handler is defined as void (*handler)(unsigned irq);
in our case, this is rthal_irq_trampoline() [2] , but can be different for some other cases;
[2] rthal_irq_trampoline() [HAL]
struct rthal_realtime_irq[IPIPE_NR_IRQS]
the handler is defined as void (*handler)(unsigned irq, void *cookie);
this one normally does a simple thing, just calls xnintr_irq_handler() [3] as you have mentioned before.
[3] xnintr_irq_handler() [nucleus]
this routine calls a certain user's ISR as well as handles some nucleus-specific chores (re-scheduling, etc.)
[4] user's ISR [user driver]
does user-specific things
Well, [3] is necessary anyway since some nucleus-related chores must be done and this is a correct layer for that (e.g. [2] knows nothing about scheduling).
What can be theoretically merged is [1] + [2] (errr... I said theoretically, it's still not the case to kill me for just having said that :o). To this end, ipipe_domain should be extended in order to contain all the fields of [2]::struct rthal_realtime_irq (at least, handler(irq, cookie) + cookie). btw, ipipe_domain::irqs may even contain a pointer to the slightly modified xnintr_t structure (which is really e.g. a circular list) that may be passed as "cockie" to the xnintr_irq_handler().
The analogy is irq_desc_t vs. irqaction structures in Linux.
This way, xnintr_irq_handler() can be called from adeos-ipipe layer directly without the [2] layer.
But that change looks quite invasive to me so far since ipipe_domain::irqs::handler(irq - with a single parameter) is used all over the map.
In our case, the relation between xnintr_irq_handler() and rthal_irq_trampoline() is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer. Hopefully, xnintr_irq_handler() is i-cache-hot as long as possible under high irq load. In this case, I guess, rthal_irq_trampoline() will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler() in our case).
Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...
Quoted 2 lines
Jan
---
Best regards,
Dmitry
Quoted 70 lines · Dmitry Adamushko
Quoted 15 lines · you
Quoted 3 lines · Dmitry Adamushko
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.Quoted 3 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Let's take a look at what we have got currently:
[1] ipipe_domain::irqs[IPIPE_NR_IRQS] [ADEOS-IPIPE]
the handler is defined as void (*handler)(unsigned irq);
in our case, this is
rthal_irq_trampoline()[2] , but can be different for some other cases;[2]
rthal_irq_trampoline()[HAL]struct rthal_realtime_irq[IPIPE_NR_IRQS]
the handler is defined as void (*handler)(unsigned irq, void *cookie);
this one normally does a simple thing, just calls
xnintr_irq_handler()[3] as you have mentioned before.[3]
xnintr_irq_handler()[nucleus]this routine calls a certain user's ISR as well as handles some nucleus-specific chores (re-scheduling, etc.)
[4] user's ISR [user driver]
does user-specific things
Well, [3] is necessary anyway since some nucleus-related chores must be done and this is a correct layer for that (e.g. [2] knows nothing about scheduling).
What can be theoretically merged is [1] + [2] (errr... I said theoretically, it's still not the case to kill me for just having said that :o). To this end,
ipipe_domainshould be extended in order to contain all the fields of [2]::structrthal_realtime_irq(at least,handler(irq, cookie)+ cookie). btw,ipipe_domain::irqsmay even contain a pointer to the slightly modifiedxnintr_tstructure (which is really e.g. a circular list) that may be passed as "cockie" to thexnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.
Quoted 11 lines
In our case, the relation between
xnintr_irq_handler()andrthal_irq_trampoline()is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer. Hopefully,xnintr_irq_handler()is i-cache-hot as long as possible under high irq load. In this case, I guess,rthal_irq_trampoline()will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler()in our case).
Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...
...compared to the usefulness I still have to understand - yes.
Other option: what about merging [2] into [3], i.e. let xnintr_irq_handler deal with the translation IRQ number -> cookie?
Philippe, I guess your wisdom is required here. Are we missing some important point in your design right now?
Jan
Quoted 12 lines · you
Quoted 11 lines
[...]
In our case, the relation betweenxnintr_irq_handler()andrthal_irq_trampoline()is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer. Hopefully,xnintr_irq_handler()is i-cache-hot as long as possible under high irq load. In this case, I guess,rthal_irq_trampoline()will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler()in our case).
Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...
Quoted 4 lines
...compared to the usefulness I still have to understand - yes.
Other option: what about merging [2] into [3], i.e. let
xnintr_irq_handlerdeal with the translation IRQ number -> cookie?
In that case, the nucleus must keep track of all the irqs, i.e. some_struct irqs[IPIPE_NR_IRQS]. Ok, the rthal_realtime_irq[] may be removed here from hal.
But there is already the per-irq array in ipipe_domain struct. Having got [1] and [2] merged, we would have this array as the only one and avoid the use of rthal_realtime_irq[] at all. Although, the ipipe_domain would become a bit more heavy :) Well, but [2] into [3] is leeeess intrusive on the other hand.
Quoted 4 lines
Philippe, I guess your wisdom is required here. Are we missing some important point in your design right now?
He would be glad you/we/someone else would come up with a worthy decision (even if it's "keep it as is") without relying on the explanation of the current design from his side.
Ok, the morning brings better solutions :o)
Quoted 1 line
Jan
---
Best regards,
Dmitry
Quoted 17 lines · Dmitry Adamushko
Quoted 11 lines · you
Quoted 11 lines
[...]
In our case, the relation betweenxnintr_irq_handler()andrthal_irq_trampoline()is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer. Hopefully,xnintr_irq_handler()is i-cache-hot as long as possible under high irq load. In this case, I guess,rthal_irq_trampoline()will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler()in our case).
Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...Quoted 4 lines
...compared to the usefulness I still have to understand - yes.
Other option: what about merging [2] into [3], i.e. let
xnintr_irq_handlerdeal with the translation IRQ number -> cookie?
Quoted 7 lines
In that case, the nucleus must keep track of all the irqs, i.e.
some_structirqs[IPIPE_NR_IRQS]. Ok, the rthal_realtime_irq[] may be removed here from hal.
But there is already the per-irq array inipipe_domainstruct. Having got [1] and [2] merged, we would have this array as the only one and avoid the use of rthal_realtime_irq[] at all. Although, theipipe_domainwould become a bit more heavy :) Well, but [2] into [3] is leeeess intrusive on the other hand.
Due to the intrusiveness, I would vote for a [2]->[3] merge.
One issue remains in any case: the HAL currently maintains a /proc entry for the registered IRQs. It reports if a handler is registered and the IRQ hits per CPU. As I think this entry should also report the registered driver names in the future, we have to hand the management over to whatever part traces all registered handlers. Is this acceptable from the layering point of view?
Jan
Quoted 10 lines · you
Quoted 8 lines
In that case, the nucleus must keep track of all the irqs, i.e.
some_structirqs[IPIPE_NR_IRQS]. Ok, the rthal_realtime_irq[] may be removed here from hal.
But there is already the per-irq array inipipe_domainstruct. Having got
[1] and [2] merged, we would have this array as the only one and avoid the use of rthal_realtime_irq[] at all. Although, theipipe_domainwould become a bit more heavy :) Well, but [2] into [3] is leeeess intrusive on the other hand.Due to the intrusiveness, I would vote for a [2]->[3] merge.
Yep, obviously.
What about something like this:
[hal/generic.c]
struct rthal_realtime_irq_t {
struct xnintr_t *handlers; // or xnqueue_t handlers; unsigned long hits[RTHAL_NR_CPUS]; // maybe something else
} rthal_realtime_irq[IPIPE_NR_IRQS];
either this array should be exported so to be available from the nucleus layer or should be moved into the nucleus layer completely, but so far I like the idea the HAL handles basic irq-related chores, if no then e.g. what to do with rthal_linux_irq, apc counterparts.
struct xnintr_t is extended as follows:
...
unsigned flags; // e.g. IRQ_SHARED
const char *name;
struct xnintr_t *next; // or xnholder_t hlink;
};
actually, xniack_t iack field should gone or a policy on its use should be established. e.g. what if a few handlers that share the same irq want to set up its own iack handler. I see that it's not a part of the rtdm's request_irq() interface (always NULL so that the default one is used) but a part of the native and posix skins' interfaces (e.g. rt_intr_create).
Another thing is how different return values of ISR handlers should be combined:
e.g. RT_INTR_CHAINED vs. HANDLED
first handler reports CHAINED, the second one - HANDLED and some of them - ENABLE.
[nucleus.c]
xnintr_irq_handler(unsigned irq, void *cookie) -> xnintr_irq_handler(unsigned irq)
Thus, it may be passed into rthal_virtualize_irq() and called directly from the ipipe layer (we don't need that hal::irq_trampoline() any more).
xnintr_irq_handler(unsigned irq)
{
- xnintr_t *intr = (xnintr_t *)cookie;
+ xnintr_t *handlers = hal_realtime_irq(irq)->handlers; // or get a queue otherwise
...
- s = intr->isr(intr);
+ iterate through all the handlers
...
}
err, hopefully that looks not like a complete mess, anyway that's what on the top of my head at the moment :)
Quoted 7 lines
One issue remains in any case: the HAL currently maintains a /proc entry for the registered IRQs. It reports if a handler is registered and the IRQ hits per CPU. As I think this entry should also report the registered driver names in the future, we have to hand the management over to whatever part traces all registered handlers. Is this acceptable from the layering point of view?
But the same can be done from the HAL if we're still going to keep the per-irq array there as well as basic realtime-irq-related chores. Just in that case, the HAL would be aware about some extended information, like names.
Quoted 2 lines
Jan
---
Best regards,
Dmitry
Quoted 67 lines · Jan Kiszka
Quoted 55 lines · Dmitry Adamushko
Quoted 16 lines · you
Quoted 3 lines · Dmitry Adamushko
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.Quoted 3 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Let's take a look at what we have got currently:
[1] ipipe_domain::irqs[IPIPE_NR_IRQS] [ADEOS-IPIPE]
the handler is defined as void (*handler)(unsigned irq);
in our case, this is
rthal_irq_trampoline()[2] , but can be different for some other cases;[2]
rthal_irq_trampoline()[HAL]struct rthal_realtime_irq[IPIPE_NR_IRQS]
the handler is defined as void (*handler)(unsigned irq, void *cookie);
this one normally does a simple thing, just calls
xnintr_irq_handler()[3] as you have mentioned before.[3]
xnintr_irq_handler()[nucleus]this routine calls a certain user's ISR as well as handles some nucleus-specific chores (re-scheduling, etc.)
[4] user's ISR [user driver]
does user-specific things
Well, [3] is necessary anyway since some nucleus-related chores must be done and this is a correct layer for that (e.g. [2] knows nothing about scheduling).
What can be theoretically merged is [1] + [2] (errr... I said theoretically, it's still not the case to kill me for just having said that :o). To this end,
ipipe_domainshould be extended in order to contain all the fields of [2]::structrthal_realtime_irq(at least,handler(irq, cookie)+ cookie). btw,ipipe_domain::irqsmay even contain a pointer to the slightly modifiedxnintr_tstructure (which is really e.g. a circular list) that may be passed as "cockie" to thexnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.Quoted 8 lines
This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.In our case, the relation between
xnintr_irq_handler()andrthal_irq_trampoline()is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer.
Hopefully,xnintr_irq_handler()is i-cache-hot as long as possible under high irq load. In this case, I guess,rthal_irq_trampoline()will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler()in our case). Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...
Quoted 5 lines
...compared to the usefulness I still have to understand - yes.
Other option: what about merging [2] into [3], i.e. let
xnintr_irq_handlerdeal with the translation IRQ number -> cookie?
That's an option, yes. The other one being to teach Adeos to pass an additional cookie, but in such a case, only the i-pipe series would be upgraded to allow that, which would be a bit rude to people still currently relying on the legacy oldgen patches for running Xenomai. This said, at some point in time, upgrading will be necessary though.
Quoted 3 lines
Philippe, I guess your wisdom is required here. Are we missing some important point in your design right now?
Mmm, for the wisdom thing, please see there: http://fr.wikipedia.org/wiki/Mahatma_Gandhi
For the design issue, I agree that the initial trampoline is just a waste of cache lines and cycles. The only thing to keep in mind is to preserve a sensible layering so that the whole thing is still able to run over the event-driven simulation engine we have, but AFAICS, fixing the xnarch layer everywhere would grant that.
Quoted 9 lines
Jan
------------------------------------------------------------------------
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 42 lines · Dmitry Adamushko
Quoted 15 lines · you
Quoted 3 lines · Dmitry Adamushko
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.Quoted 3 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Let's take a look at what we have got currently:
[1] ipipe_domain::irqs[IPIPE_NR_IRQS] [ADEOS-IPIPE]
the handler is defined as void (*handler)(unsigned irq);
in our case, this is
rthal_irq_trampoline()[2] , but can be different for some other cases;[2]
rthal_irq_trampoline()[HAL]struct rthal_realtime_irq[IPIPE_NR_IRQS]
the handler is defined as void (*handler)(unsigned irq, void *cookie);
this one normally does a simple thing, just calls
xnintr_irq_handler()[3] as you have mentioned before.[3]
xnintr_irq_handler()[nucleus]this routine calls a certain user's ISR as well as handles some nucleus-specific chores (re-scheduling, etc.)
Quoted 9 lines
[4] user's ISR [user driver]
does user-specific things
Well, [3] is necessary anyway since some nucleus-related chores must be done and this is a correct layer for that (e.g. [2] knows nothing about scheduling).
What can be theoretically merged is [1] + [2] (errr... I said theoretically, it's still not the case to kill me for just having said that :o). To this end,
ipipe_domainshould be extended in order to contain all the fields of [2]::structrthal_realtime_irq(at least,handler(irq, cookie)+ cookie). btw,ipipe_domain::irqsmay even contain a pointer to the slightly modified
This would mean changing a core Adeos prototype, though.
xnintr_t structure (which is really e.g. a circular list) that may be passed
Quoted 8 lines
as "cockie" to the
xnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.
I'd really prefer making one invasive change early in the process of addressing the issue than several kludges later to work around structural shortcomings, so no problem, go wild, I'm all ears.
Quoted 17 lines
In our case, the relation between
xnintr_irq_handler()andrthal_irq_trampoline()is 1:1. The first one does much more things that the second one which is really almost a pure redirection layer.
Hopefully,xnintr_irq_handler()is i-cache-hot as long as possible under high irq load. In this case, I guess,rthal_irq_trampoline()will be in cache as well (since it's really small) and the overhead is only about having one array indexing op. and issuing a call via a pointer to the function (xnintr_irq_handler()in our case). Do you think that really gives a significant overhead? Well, maybe so. I'm not a profie here anyway...Quoted 1 line
Jan
---
Best regards,
Dmitry_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 74 lines · Philippe Gerum
Quoted 54 lines · Dmitry Adamushko
Quoted 16 lines · you
Quoted 4 lines · Dmitry Adamushko
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track
of registered irqs.That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.Quoted 3 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
Let's take a look at what we have got currently:
[1] ipipe_domain::irqs[IPIPE_NR_IRQS] [ADEOS-IPIPE]
the handler is defined as void (*handler)(unsigned irq);
in our case, this is
rthal_irq_trampoline()[2] , but can be different for some other cases;[2]
rthal_irq_trampoline()[HAL]struct rthal_realtime_irq[IPIPE_NR_IRQS]
the handler is defined as void (*handler)(unsigned irq, void *cookie);
this one normally does a simple thing, just calls
xnintr_irq_handler()
[3] as you have mentioned before.[3]
xnintr_irq_handler()[nucleus]this routine calls a certain user's ISR as well as handles some nucleus-specific chores (re-scheduling, etc.)
[4] user's ISR [user driver]
does user-specific things
Well, [3] is necessary anyway since some nucleus-related chores must be done and this is a correct layer for that (e.g. [2] knows nothing about scheduling).
Quoted 7 lines
What can be theoretically merged is [1] + [2] (errr... I said theoretically, it's still not the case to kill me for just having said that :o). To this end,
ipipe_domainshould be extended in order to contain all the fields of [2]::structrthal_realtime_irq(at least,handler(irq, cookie)+ cookie).
btw,ipipe_domain::irqsmay even contain a pointer to the slightly modifiedThis would mean changing a core Adeos prototype, though.
xnintr_tstructure (which is really e.g. a circular list) that may be passedQuoted 7 lines
as "cockie" to the
xnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.
Quoted 9 lines
Quoted 4 lines
But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.I'd really prefer making one invasive change early in the process of addressing the issue than several kludges later to work around structural shortcomings, so no problem, go wild, I'm all ears.
Oh, we have green light for some /real/ changes! ;)
Well, one advantage of a cookie inside the ipipe patch is that also the data locality would increase, especially for the trivial case of only one handler being installed. Then we would be able to handle down the user's xnintr_t structure, and that one would already make it into the caches by adeos traversing the pipe...
Jan
Quoted 7 lines · you
Quoted 7 lines
as "cockie" to the
xnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.
Quoted 8 lines
Quoted 3 lines
But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.I'd really prefer making one invasive change early in the process of addressing the issue than several kludges later to work around structural shortcomings, so no problem, go wild, I'm all ears.
If we only want to get rid of the trampoline-thing then [2] + [3] would work out (btw, I have sent a message this morning where I tried to provide even some pseudo-code :)
But if we want to (think that we may) gain the adventage of having a more flexible irq-related support from the ipipe layer, then yep, those changes might look worthy. I thought that this way, we would even get rid of another per-irq (rthal_realtime_irq) array in hal/generic.c, maybe even from rthal_linux_irq too. The sole one is provided by the ipipe_domain structure and a set of generic interfaces e.g. via system.h so that the HAL or another layer may get access of it.
e.g.
the "cookie" remains opaque for the ipipe but when requested by HAL::rthal_irq_request() or NUCLEUS::xnintr_irq_handler() it's treated as a chain of ISR handlers.
---
Best regards,
Dmitry
Quoted 29 lines · Dmitry Adamushko
Quoted 7 lines · you
Quoted 7 lines
as "cockie" to the
xnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.Quoted 7 lines
Quoted 3 lines
But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.I'd really prefer making one invasive change early in the process of addressing the issue than several kludges later to work around structural shortcomings, so no problem, go wild, I'm all ears.
If we only want to get rid of the trampoline-thing then [2] + [3] would work out (btw, I have sent a message this morning where I tried to provide even some pseudo-code :)
But if we want to (think that we may) gain the adventage of having a more flexible irq-related support from the ipipe layer, then yep, those changes might look worthy. I thought that this way, we would even get rid of another per-irq (
rthal_realtime_irq) array inhal/generic.c, maybe even fromrthal_linux_irqtoo. The sole one is provided by theipipe_domainstructure and a set of generic interfaces e.g. viasystem.hso that the HAL or another layer may get access of it.
Quoted 6 lines
e.g.
the "cookie" remains opaque for the ipipe but when requested by
HAL::rthal_irq_request()orNUCLEUS::xnintr_irq_handler()it's treated as a chain of ISR handlers.
Yep, that's also what I had in mind about potential ipipe changes and their use in the nucleus.
Jan
Quoted 25 lines · Jan Kiszka
Quoted 23 lines · Dmitry Adamushko
Quoted 7 lines · you
Quoted 7 lines
as "cockie" to the
xnintr_irq_handler().The analogy is
irq_desc_tvs. irqaction structures in Linux.This way,
xnintr_irq_handler()can be called from adeos-ipipe layer directly without the [2] layer.Quoted 8 lines
Quoted 3 lines
But that change looks quite invasive to me so far since
ipipe_domain::irqs::handler(irq - with a single parameter)is used all over the map.I'd really prefer making one invasive change early in the process of addressing the issue than several kludges later to work around structural shortcomings, so no problem, go wild, I'm all ears.
If we only want to get rid of the trampoline-thing then [2] + [3] would work out (btw, I have sent a message this morning where I tried to provide even some pseudo-code :)
But if we want to (think that we may) gain the adventage of having a more flexible irq-related support from the ipipe layer, then yep, those changes might look worthy. I thought that this way, we would even get rid of another per-irq (
rthal_realtime_irq) array inhal/generic.c, maybe even fromrthal_linux_irqtoo. The sole one is provided by theipipe_domainstructure and a set of generic interfaces e.g. viasystem.hso that the HAL or another layer may get access of it.
Quoted 9 lines
Quoted 4 lines
e.g.
the "cookie" remains opaque for the ipipe but when requested by
HAL::rthal_irq_request()orNUCLEUS::xnintr_irq_handler()it's treated as a chain of ISR handlers.Yep, that's also what I had in mind about potential ipipe changes and their use in the nucleus.
Ok, let's go for those changes this way:
1. The I-pipe series needs to be updated so that an opaque cookie is passed to the handler; since we have a change in the interface, the 1.1 series has to be started for this purpose.
2. In order to let the people running the legacy RTAI/fusion and Xenomai 2.0.x series a reasonable amount of time to upgrade their patchset, the IRQ layer updates (sharing and trampoline suppression) will go to the Xenomai 2.1 dev branch. IOW, Xenomai 2.1 will be exclusively based on the I-pipe 1.1 series, which also means that Xenomai support for the oldgen Adeos and I-pipe 1.0 patches will be discontinued after the Xenomai 2.0.x series is closed.
3. Changes in the IRQ layer will be made at nucleus level, which is the most efficient way to provide them.
It should be noted that as part of the build system refactoring, the real-time HAL has become a static portion of the Linux kernel, with its generic part being moved to the nucleus. IOW, the proposed changes will basically end up as redispatching some code inside the nucleus.
Signature · 1 line
Philippe.
Quoted 9 lines
-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Philippe Gerum Envoyé : mardi 1 novembre 2005 18:30
À : Jan Kiszka
Cc : xenomai-core
Objet : Re: [Xenomai-core] [RFC] support for sharing IRQs
....
Quoted 7 lines
Ok, let's go for those changes this way:
1. The I-pipe series needs to be updated so that an opaque cookie is passed to the handler; since we have a change in the interface, the 1.1 series has to be started for this purpose.
Quoted 8 lines
2. In order to let the people running the legacy RTAI/fusion and Xenomai 2.0.x series a reasonable amount of time to upgrade their patchset, the IRQ layer updates (sharing and trampoline suppression) will go to the Xenomai 2.1 dev branch. IOW, Xenomai 2.1 will be exclusively based on the I-pipe 1.1 series, which also means that Xenomai support for the oldgen Adeos and I-pipe 1.0 patches will be discontinued after the Xenomai 2.0.x series is closed.
I agree with all that is said in this post; however there is just a smal
problem: some very useful tool for xenomai application debug and tune is LTT; however the only available Adeos+LTT patch is not an ipipe one, but an old linux-2.6.9 kernel patch.
At least the LTT support should be available with an ipipe-based Adeos-1.1 patch for 2.6.9 (waiting for LTT to support a more recent kernel), so that LTT is not lost for xenomai (as it seems to be in fact for RTAI).
Bernard
Quoted 19 lines
3. Changes in the IRQ layer will be made at nucleus level, which is the most efficient way to provide them.
It should be noted that as part of the build system refactoring, the real-time HAL has become a static portion of the Linux kernel, with its generic part being moved to the nucleus. IOW, the proposed changes will basically end up as redispatching some code inside the nucleus.
Signature · 6 lines
Philippe. _______________________________________________ Xenomai-core mailing list [email protected] https://mail.gna.org/listinfo/xenomai-core
Quoted 20 lines · Bernard Dautrevaux
Quoted 10 lines
-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Philippe Gerum Envoyé : mardi 1 novembre 2005 18:30
À : Jan Kiszka
Cc : xenomai-core
Objet : Re: [Xenomai-core] [RFC] support for sharing IRQs....Quoted 5 lines
Ok, let's go for those changes this way:
1. The I-pipe series needs to be updated so that an opaque cookie is passed to the handler; since we have a change in the interface, the 1.1 series has to be started for this purpose.
2. In order to let the people running the legacy RTAI/fusion and Xenomai 2.0.x series a reasonable amount of time to upgrade their patchset, the IRQ layer updates (sharing and trampoline suppression) will go to the Xenomai 2.1 dev branch. IOW, Xenomai 2.1 will be exclusively based on the I-pipe 1.1 series, which also means that Xenomai support for the oldgen Adeos and I-pipe 1.0 patches will be discontinued after the Xenomai 2.0.x series is closed.
Quoted 9 lines
I agree with all that is said in this post; however there is just a smal
problem: some very useful tool for xenomai application debug and tune is LTT; however the only available Adeos+LTT patch is not an ipipe one, but an old linux-2.6.9 kernel patch.At least the LTT support should be available with an ipipe-based Adeos-1.1 patch for 2.6.9 (waiting for LTT to support a more recent kernel), so that LTT is not lost for xenomai (as it seems to be in fact for RTAI).
LTT has been undergoing a significant refactoring recently, so there has been little incentive to go for a combo Adeos+LTT patch over a moving target, this is the reason why Alex - the LTT support maintainer for Xenomai - has focused on a 2.6.9 kernel featuring the previous LTT architecture, and this was a good decision. Upgrading this combo will be done in the I-pipe 1.1 timeframe over the newest LTT support, for sure, basically to get rid of the oldgen Adeos patches for Xenomai completely.
RTAI had problem maintaining the LTT support because of the lack of a maintainer; we do have one. This said, the best way you could contribute to this is crafting a prototype combo between I-pipe 1.0 and a recent LTT core (i.e. the one that relies on the refactored relayfs stuff), especially if you do consider this support as a critical feature. I guess that Alex would be fine working on this base later.
Quoted 26 lines
Bernard
Quoted 14 lines
3. Changes in the IRQ layer will be made at nucleus level, which is the most efficient way to provide them.
It should be noted that as part of the build system refactoring, the real-time HAL has become a static portion of the Linux kernel, with its generic part being moved to the nucleus. IOW, the proposed changes will basically end up as redispatching some code inside the nucleus.
Signature · 6 lines
Philippe. _______________________________________________ Xenomai-core mailing list [email protected] https://mail.gna.org/listinfo/xenomai-core_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
[Xenomai-core] LTT support on Xenomai (was part of support for sharing IRQs)
Quoted 20 lines
-----Message d'origine-----
De : Philippe Gerum [mailto:[email protected] Envoyé : mercredi 2 novembre 2005 15:19
À : Bernard Dautrevaux
Cc : [email protected]; [email protected]
Objet : Re: [Xenomai-core] [RFC] support for sharing IRQsQuoted 7 lines · Bernard Dautrevaux
Quoted 7 lines
-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Philippe Gerum Envoyé : mardi 1 novembre 2005 18:30 À : Jan Kiszka Cc :xenomai-core
Quoted 4 lines
Quoted 1 line
Objet : Re: [Xenomai-core] [RFC] support for sharing IRQs
....
Quoted 8 lines
Quoted 1 line
At least the LTT support should be available with an
ipipe-based Adeos-1.1
Quoted 1 line
patch for 2.6.9 (waiting for LTT to support a more recent
kernel), so that
Quoted 2 lines
LTT is not lost for xenomai (as it seems to be in fact for RTAI).
LTT has been undergoing a significant refactoring recently,
Do you mean there is something more recent than ltt-0.9.6-pre4 ?
If this is true where can this be found?
Quoted 8 lines
so there has been
little incentive to go for a combo Adeos+LTT patch over a moving target, this is
the reason why Alex - the LTT support maintainer for Xenomai
- has focused on a
2.6.9 kernel featuring the previous LTT architecture, and this was a good
decision.
This restrain then to use oldgen Adeos architecture, as LTT is only available on 2.6.9 and ipipe only from 2.6.13; is there anything preventing having ipipe on 2.6.9 (apart from workload of course)?
Quoted 5 lines
Upgrading this combo will be done in the I-pipe 1.1 timeframe over the
newest LTT support, for sure, basically to get rid of the oldgen Adeos patches
for Xenomai completely.
That for sure will be nice.
Quoted 10 lines
RTAI had problem maintaining the LTT support because of the lack of a maintainer; we do have one. This said, the best way you could contribute to this
is crafting a prototype combo between I-pipe 1.0 and a recent LTT core (i.e. the
one that relies on the refactored relayfs stuff), especially if you do consider
this support as a critical feature. I guess that Alex would be fine working on
this base later.
This is something we may look at, but need access to this new-gen LTT, hopefuly supporting recent Linux kernel, at least 2.6.13.
BTW the rapid evolution of 2.6 is perhaps a benefit for some people, but to maintain kernel-dependent extensions, it seems to be more a nightmare than anything else...
Quoted 5 lines
Signature · 1 line
Philippe.
Bernard
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
[...]
e.g.
the "cookie" remains opaque for the ipipe but when requested by
HAL::rthal_irq_request()orNUCLEUS::xnintr_irq_handler()it's treated
as a
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines
chain of ISR handlers.
Yep, that's also what I had in mind about potential ipipe changes and their use in the nucleus.
Ok, let's go for those changes this way:
1. The I-pipe series needs to be updated so that an opaque cookie
ispassed to
Quoted 1 line
the handler; since we have a change in the interface, the 1.1 serieshas
to be
Quoted 5 lines
started for this purpose.
2. In order to let the people running the legacy RTAI/fusion and Xenomai 2.0.x
series a reasonable amount of time to upgrade their patchset, the IRQ
layer
Quoted 1 line
updates (sharing and trampoline suppression) will go to the Xenomai 2.1
dev
Quoted 1 line
branch. IOW, Xenomai 2.1 will be exclusively based on the I-pipe 1.1
series,
Quoted 5 lines
which also means that Xenomai support for the oldgen Adeos and I-pipe 1.0
patches will be discontinued after the Xenomai 2.0.x series is closed.
3. Changes in the IRQ layer will be made at nucleus level, which is the
most
Quoted 2 lines
efficient way to provide them.
Ok, I'd take this task (err.. since I'm not doing anything useful for Xenomai at the moment). Although, I may start not earlier than next week. Jan, since you have come up with the initial proposol and maybe you need get that new code working asap, it's up to you to handle it on your own :o) Just let me know in that case.
Quoted 5 lines
--
Philippe.
---
Best regards,
Dmitry
Quoted 35 lines · Dmitry Adamushko
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
[...]
e.g.
the "cookie" remains opaque for the ipipe but when requested by
HAL::rthal_irq_request()orNUCLEUS::xnintr_irq_handler()it's treatedas a
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
chain of ISR handlers.
Yep, that's also what I had in mind about potential ipipe changes and their use in the nucleus.
Ok, let's go for those changes this way:
1. The I-pipe series needs to be updated so that an opaque cookie
ispassed to
Quoted 1 line
the handler; since we have a change in the interface, the 1.1 serieshas
to be
Quoted 5 lines
started for this purpose.
2. In order to let the people running the legacy RTAI/fusion and Xenomai 2.0.x
series a reasonable amount of time to upgrade their patchset, the IRQlayer
Quoted 1 line
updates (sharing and trampoline suppression) will go to the Xenomai 2.1
dev
Quoted 1 line
branch. IOW, Xenomai 2.1 will be exclusively based on the I-pipe 1.1
series,
Quoted 5 lines
which also means that Xenomai support for the oldgen Adeos and I-pipe 1.0
patches will be discontinued after the Xenomai 2.0.x series is closed.
3. Changes in the IRQ layer will be made at nucleus level, which is the
most
Quoted 9 lines
Quoted 2 lines
efficient way to provide them.
Ok, I'd take this task (err.. since I'm not doing anything useful for Xenomai at the moment). Although, I may start not earlier than next week. Jan, since you have come up with the initial proposol and maybe you need get that new code working asap, it's up to you to handle it on your own :o) Just let me know in that case.
Thanks for the helping hand. I will be really happy if you could realise this.
It's also not yet burning on our side. I guess we will be busy enough to get a few devices running, to have ALL running with potentially shared IRQs can be scheduled later.
Hope we will be able to continue with more detailed discussions tomorrow evening!
Jan
Quoted 65 lines · Jan Kiszka
Quoted 10 lines · Dmitry Adamushko
Hi Jan,
Quoted 4 lines
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler only in case sharing is actually practiced for a specific line.
Could you be a bit more specific on what is meant by "...sharing is actually practiced for a specific line"?
Ok, one have to remind that my existing code is built on top of the non-sharing
xnintr_xxxAPI. This means that I had to define a trampoline ISR which does the loop over all registered end-user ISRs. And this intermediate handler is only involved when A) the IRQ is sharable and B) there is actually more than one ISR registered for it.This "smartness" becomes obsolete when we embed a doubly-linked list into
xnintr_tand already iterate over it inxnintr_irq_handler().Quoted 5 lines
To my knowledge, the matter is only about whether a certain device (driver) permits the earlier obtained irq line to be shared with other devices. i.e. a driver [1] may succeed with an irq registration request in case another driver [2] already holds this line but both [1] and [2] have specified a
SA_SHIRQflag.Yep.
Quoted 9 lines
Quoted 5 lines
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but which way is desired? (I would vote for the nucleus...)
If we have a policy that all the drivers should be implemented on top of RTDM, then, it can be done there. If no (and I guess so), this feature should be common and I'd vote for the nucleus.
Drivers should be built over RTDM, that's true. But there may still be driver-like applications, also in user space that attach directly to the IRQs via the various skin APIs. I think it would be good to let them live side-by-side with RTDM drivers or other IRQ-using applications.
Quoted 3 lines
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
That's true. And it also raises another question to me: why do we have those two different IRQ models?
The HAL only one handler per IRQ which get called with the triggering IRQ number. That handler will call the nucleus with an attached cookie. And on the other side is the nucleus which works with a
xnintr_tper IRQ. Thexnintr_irq_handler()deals with things like re-enabling IRQs, rescheduling, etc.
Quoted 4 lines
I'm asking as this abstraction adds one trampoline call (at HAL level), thus may lead to more I-cache misses. Isn't it worth considering some HAL mechanisms based on more #defines and static inlines in this regard?
While we are at it, we could just move the HAL's trampoline part to the arch/system.h support. Two things to keep in mind: Adeos does not provide cookies (yeah, what a pity), but passes an IRQ number the xnarch level doesn't grok. Some low-level prototypes would have to be fixed and the cookie array moved, but basically, getting rid of the initial trampoline seems like a good idea since it brings nothing in the picture.
Quoted 10 lines
Jan
------------------------------------------------------------------------
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 15 lines · Dmitry Adamushko
Hi Jan,
Quoted 5 lines
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler only in case sharing is actually practiced for a specific line.
Could you be a bit more specific on what is meant by "...sharing is actually practiced for a specific line"?
To my knowledge, the matter is only about whether a certain device (driver) permits the earlier obtained irq line to be shared with other devices. i.e. a driver [1] may succeed with an irq registration request in case another driver [2] already holds this line but both [1] and [2] have specified a
SA_SHIRQflag.
Quoted 6 lines
Quoted 4 lines
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but which way is desired? (I would vote for the nucleus...)
If we have a policy that all the drivers should be implemented on top of RTDM, then, it can be done there. If no (and I guess so), this feature should be common and I'd vote for the nucleus.
Actually, now that we have a decent driver model built in, I will enforce the rule that all Xenomai mainline drivers must be based on RTDM, because we do need such a common platform to prevent braindamage calling interfaces hysteria. This will be a good opportunity to see how flexible the thing is when confronted to the needs of various hw and semantics.
Quoted 18 lines
It seems to me now, that some parts of the hal will be involved (rthal_irq_request/release()) since the nucleus itself doesn't keep track of registered irqs.
Quoted 3 lines
Jan
---
Best regards,
Dmitry------------------------------------------------------------------------
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 32 lines · Philippe Gerum
Quoted 24 lines · Dmitry Adamushko
Hi Jan,
Quoted 4 lines
I have some code hanging around here which implements IRQ sharing at skin level for an experimental in-house development over Xenomai. The code is smart enough to register an IRQ sharing trampoline handler
only
Quoted 1 line
in case sharing is actually practiced for a specific line.
Could you be a bit more specific on what is meant by "...sharing is actually practiced for a specific line"?
To my knowledge, the matter is only about whether a certain device (driver) permits the earlier obtained irq line to be shared with other devices.
i.e. a driver [1] may succeed with an irq registration request in case another driver [2] already holds this line but both [1] and [2] have specified aSA_SHIRQflag.Quoted 3 lines
I think it would be possible to break this out and generate a mainline patch. Anyway, the question for me is where to put this best, at skin (RTDM?) or at nucleus level? Both is technically feasible, but
Quoted 6 lines
which way
Quoted 1 line
is desired? (I would vote for the nucleus...)
If we have a policy that all the drivers should be implemented on top of RTDM, then, it can be done there. If no (and I guess so), this feature should be common and I'd vote for the nucleus.
Quoted 7 lines
Actually, now that we have a decent driver model built in, I will enforce the rule that all Xenomai mainline drivers must be based on RTDM, because we do need such a common platform to prevent braindamage calling interfaces hysteria. This will be a good opportunity to see how flexible the thing is when confronted to the needs of various hw and semantics.
So far the rtdm_irq_xxx API consists of pure static inlines. If we decide to move IRQ sharing support only into that layer, it would materialise into real code and another trampoline. So, I still vote for a generic support at nucleus level. :)
Jan