* [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
@ 2015-11-01 3:58 Mathieu Rondonneau
2015-11-02 16:27 ` Gilles Chanteperdrix
0 siblings, 1 reply; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-01 3:58 UTC (permalink / raw)
To: xenomai
Hi,
irq handlers registered with devm_request_threaded_irq does not get
triggered when interrupt fires.
The mmc driver uses this (can not load the rootfs).
Only the IPIPE patch is enabled.
the armctrl chipirq is triggering the .ack handler instead so the
interrupt is happening.
Any suggestion on where I should look? how is this supported by the
ipipe layer?
Thanks,
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
[not found] <56358DE3.8030308@hotmail.com>
@ 2015-11-02 2:58 ` Mathieu Rondonneau
2015-11-02 3:21 ` Mathieu Rondonneau
0 siblings, 1 reply; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-02 2:58 UTC (permalink / raw)
To: xenomai
On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
> Hi,
>
> irq handlers registered with devm_request_threaded_irq does not get
> triggered when interrupt fires.
>
> The mmc driver uses this (can not load the rootfs).
> Only the IPIPE patch is enabled.
> the armctrl chipirq is triggering the .ack handler instead so the
> interrupt is happening.
>
> Any suggestion on where I should look? how is this supported by the
> ipipe layer?
>
> Thanks,
> -Mathieu
I think I might have answered my own question.
Looks like I need to use ipipe_request_irq() instead.
Regards,
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 2:58 ` Mathieu Rondonneau
@ 2015-11-02 3:21 ` Mathieu Rondonneau
2015-11-02 5:23 ` Mathieu Rondonneau
2015-11-02 15:12 ` Philippe Gerum
0 siblings, 2 replies; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-02 3:21 UTC (permalink / raw)
To: xenomai
On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>> Hi,
>>
>> irq handlers registered with devm_request_threaded_irq does not get
>> triggered when interrupt fires.
>>
>> The mmc driver uses this (can not load the rootfs).
>> Only the IPIPE patch is enabled.
>> the armctrl chipirq is triggering the .ack handler instead so the
>> interrupt is happening.
>>
>> Any suggestion on where I should look? how is this supported by the
>> ipipe layer?
>>
>> Thanks,
>> -Mathieu
>
> I think I might have answered my own question.
> Looks like I need to use ipipe_request_irq() instead.
>
> Regards,
> -Mathieu
mmmm it is not true, it seems we still need a
ipipe_request_threaded_irq() to call the ackfn, put the handler in the
queue and wake up the thread once handler is executed. Or user will have
to move this functionality into their driver's IRQ handler.
It strangely looks like ipipe_request_irq's idea is similar to what
request_threaded_irq is already doing (delaying IRQ process later).
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 3:21 ` Mathieu Rondonneau
@ 2015-11-02 5:23 ` Mathieu Rondonneau
2015-11-02 15:15 ` Philippe Gerum
2015-11-02 15:12 ` Philippe Gerum
1 sibling, 1 reply; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-02 5:23 UTC (permalink / raw)
To: xenomai
On 15-11-01 07:21 PM, Mathieu Rondonneau wrote:
> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>>> Hi,
>>>
>>> irq handlers registered with devm_request_threaded_irq does not get
>>> triggered when interrupt fires.
>>>
>>> The mmc driver uses this (can not load the rootfs).
>>> Only the IPIPE patch is enabled.
>>> the armctrl chipirq is triggering the .ack handler instead so the
>>> interrupt is happening.
>>>
>>> Any suggestion on where I should look? how is this supported by the
>>> ipipe layer?
>>>
>>> Thanks,
>>> -Mathieu
>>
>> I think I might have answered my own question.
>> Looks like I need to use ipipe_request_irq() instead.
>>
>> Regards,
>> -Mathieu
> mmmm it is not true, it seems we still need a
> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
> queue and wake up the thread once handler is executed. Or user will have
> to move this functionality into their driver's IRQ handler.
>
> It strangely looks like ipipe_request_irq's idea is similar to what
> request_threaded_irq is already doing (delaying IRQ process later).
>
> -Mathieu
Looks like my bigger problem is that the handler_level_irq is not
called. Only the timer handler is called (handler_percpu_devid_irq).
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 3:21 ` Mathieu Rondonneau
2015-11-02 5:23 ` Mathieu Rondonneau
@ 2015-11-02 15:12 ` Philippe Gerum
1 sibling, 0 replies; 11+ messages in thread
From: Philippe Gerum @ 2015-11-02 15:12 UTC (permalink / raw)
To: Mathieu Rondonneau, xenomai
On 11/02/2015 04:21 AM, Mathieu Rondonneau wrote:
> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>>> Hi,
>>>
>>> irq handlers registered with devm_request_threaded_irq does not get
>>> triggered when interrupt fires.
>>>
>>> The mmc driver uses this (can not load the rootfs).
>>> Only the IPIPE patch is enabled.
>>> the armctrl chipirq is triggering the .ack handler instead so the
>>> interrupt is happening.
>>>
>>> Any suggestion on where I should look? how is this supported by the
>>> ipipe layer?
>>>
>>> Thanks,
>>> -Mathieu
>>
>> I think I might have answered my own question.
>> Looks like I need to use ipipe_request_irq() instead.
>>
>> Regards,
>> -Mathieu
> mmmm it is not true, it seems we still need a
> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
> queue and wake up the thread once handler is executed. Or user will have
> to move this functionality into their driver's IRQ handler.
The interrupt pipeline does not have to care about the thread level, it
delays the top halves, which in consequence also delays the (threaded)
bottom halves without any code change.
>
> It strangely looks like ipipe_request_irq's idea is similar to what
> request_threaded_irq is already doing (delaying IRQ process later).
>
Except that it virtualizes interrupt masking. Disabling IRQs for the
regular kernel won't prevent real-time IRQs hooked by
ipipe_request_irq() from being handled. That is a significant
difference. Besides, the pipeline does not implement a threaded IRQ
model for such virtualization.
--
Philippe.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 5:23 ` Mathieu Rondonneau
@ 2015-11-02 15:15 ` Philippe Gerum
2015-11-04 3:18 ` Mathieu Rondonneau
0 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2015-11-02 15:15 UTC (permalink / raw)
To: Mathieu Rondonneau, xenomai
On 11/02/2015 06:23 AM, Mathieu Rondonneau wrote:
> On 15-11-01 07:21 PM, Mathieu Rondonneau wrote:
>> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
>>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>>>> Hi,
>>>>
>>>> irq handlers registered with devm_request_threaded_irq does not get
>>>> triggered when interrupt fires.
>>>>
>>>> The mmc driver uses this (can not load the rootfs).
>>>> Only the IPIPE patch is enabled.
>>>> the armctrl chipirq is triggering the .ack handler instead so the
>>>> interrupt is happening.
>>>>
>>>> Any suggestion on where I should look? how is this supported by the
>>>> ipipe layer?
>>>>
>>>> Thanks,
>>>> -Mathieu
>>>
>>> I think I might have answered my own question.
>>> Looks like I need to use ipipe_request_irq() instead.
>>>
>>> Regards,
>>> -Mathieu
>> mmmm it is not true, it seems we still need a
>> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
>> queue and wake up the thread once handler is executed. Or user will have
>> to move this functionality into their driver's IRQ handler.
>>
>> It strangely looks like ipipe_request_irq's idea is similar to what
>> request_threaded_irq is already doing (delaying IRQ process later).
>>
>> -Mathieu
> Looks like my bigger problem is that the handler_level_irq is not
> called. Only the timer handler is called (handler_percpu_devid_irq).
Which may mean that the regular IRQ top half for that interrupt source
is not connected to the pipeline. You may want to check whether the
irqchip handling that device's IRQs has been made aware of the interrupt
pipeline.
--
Philippe.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-01 3:58 [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq) Mathieu Rondonneau
@ 2015-11-02 16:27 ` Gilles Chanteperdrix
2015-11-04 3:11 ` Mathieu Rondonneau
0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-02 16:27 UTC (permalink / raw)
To: Mathieu Rondonneau; +Cc: xenomai
On Sat, Oct 31, 2015 at 08:58:27PM -0700, Mathieu Rondonneau wrote:
> Hi,
>
> irq handlers registered with devm_request_threaded_irq does not get
> triggered when interrupt fires.
>
> The mmc driver uses this (can not load the rootfs).
> Only the IPIPE patch is enabled.
> the armctrl chipirq is triggering the .ack handler instead so the
> interrupt is happening.
>
> Any suggestion on where I should look? how is this supported by the
> ipipe layer?
Maybe have a look here:
http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 16:27 ` Gilles Chanteperdrix
@ 2015-11-04 3:11 ` Mathieu Rondonneau
0 siblings, 0 replies; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-04 3:11 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On 15-11-02 08:27 AM, Gilles Chanteperdrix wrote:
> On Sat, Oct 31, 2015 at 08:58:27PM -0700, Mathieu Rondonneau wrote:
>> Hi,
>>
>> irq handlers registered with devm_request_threaded_irq does not get
>> triggered when interrupt fires.
>>
>> The mmc driver uses this (can not load the rootfs).
>> Only the IPIPE patch is enabled.
>> the armctrl chipirq is triggering the .ack handler instead so the
>> interrupt is happening.
>>
>> Any suggestion on where I should look? how is this supported by the
>> ipipe layer?
>
> Maybe have a look here:
> http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/
>
Hi Gilles,
I read this guide a couple of time already in the past but it did not help.
But I think the section "flow handler" is where my problem resides since
I get the callback to trigger properly.
I will continue staring at the code. I just don't have the big picture
just yet.
Thanks,
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-02 15:15 ` Philippe Gerum
@ 2015-11-04 3:18 ` Mathieu Rondonneau
2015-11-04 7:04 ` Gilles Chanteperdrix
0 siblings, 1 reply; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-04 3:18 UTC (permalink / raw)
To: Philippe Gerum, xenomai
On 15-11-02 07:15 AM, Philippe Gerum wrote:
> On 11/02/2015 06:23 AM, Mathieu Rondonneau wrote:
>> On 15-11-01 07:21 PM, Mathieu Rondonneau wrote:
>>> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
>>>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>>>>> Hi,
>>>>>
>>>>> irq handlers registered with devm_request_threaded_irq does not get
>>>>> triggered when interrupt fires.
>>>>>
>>>>> The mmc driver uses this (can not load the rootfs).
>>>>> Only the IPIPE patch is enabled.
>>>>> the armctrl chipirq is triggering the .ack handler instead so the
>>>>> interrupt is happening.
>>>>>
>>>>> Any suggestion on where I should look? how is this supported by the
>>>>> ipipe layer?
>>>>>
>>>>> Thanks,
>>>>> -Mathieu
>>>>
>>>> I think I might have answered my own question.
>>>> Looks like I need to use ipipe_request_irq() instead.
>>>>
>>>> Regards,
>>>> -Mathieu
>>> mmmm it is not true, it seems we still need a
>>> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
>>> queue and wake up the thread once handler is executed. Or user will have
>>> to move this functionality into their driver's IRQ handler.
>>>
>>> It strangely looks like ipipe_request_irq's idea is similar to what
>>> request_threaded_irq is already doing (delaying IRQ process later).
>>>
>>> -Mathieu
>> Looks like my bigger problem is that the handler_level_irq is not
>> called. Only the timer handler is called (handler_percpu_devid_irq).
>
> Which may mean that the regular IRQ top half for that interrupt source
> is not connected to the pipeline. You may want to check whether the
> irqchip handling that device's IRQs has been made aware of the interrupt
> pipeline.
>
Thanks for replying Philippe,
This is the think, I did change the arch_irq_default_handler to call the
__ipipe_grab_irq and __ipipe_grab_ipi.
Is that what you are referring to when you say "interrupt source is not
connected to the pipile", that's what __ipipe_grab_xxx does isn't it?
Obviously I am still missing something.
If I use irq_set_chained_handler in the driver then the handler gets
called but it's just replacing the handler_irq by the driver one.
When I use request_irq then it does not call my handler (the
action.handler one).
I will keep looking.
Thanks,
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-04 3:18 ` Mathieu Rondonneau
@ 2015-11-04 7:04 ` Gilles Chanteperdrix
2015-11-05 0:51 ` Mathieu Rondonneau
0 siblings, 1 reply; 11+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-04 7:04 UTC (permalink / raw)
To: Mathieu Rondonneau; +Cc: xenomai
On Tue, Nov 03, 2015 at 07:18:37PM -0800, Mathieu Rondonneau wrote:
> On 15-11-02 07:15 AM, Philippe Gerum wrote:
> > On 11/02/2015 06:23 AM, Mathieu Rondonneau wrote:
> >> On 15-11-01 07:21 PM, Mathieu Rondonneau wrote:
> >>> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
> >>>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
> >>>>> Hi,
> >>>>>
> >>>>> irq handlers registered with devm_request_threaded_irq does not get
> >>>>> triggered when interrupt fires.
> >>>>>
> >>>>> The mmc driver uses this (can not load the rootfs).
> >>>>> Only the IPIPE patch is enabled.
> >>>>> the armctrl chipirq is triggering the .ack handler instead so the
> >>>>> interrupt is happening.
> >>>>>
> >>>>> Any suggestion on where I should look? how is this supported by the
> >>>>> ipipe layer?
> >>>>>
> >>>>> Thanks,
> >>>>> -Mathieu
> >>>>
> >>>> I think I might have answered my own question.
> >>>> Looks like I need to use ipipe_request_irq() instead.
> >>>>
> >>>> Regards,
> >>>> -Mathieu
> >>> mmmm it is not true, it seems we still need a
> >>> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
> >>> queue and wake up the thread once handler is executed. Or user will have
> >>> to move this functionality into their driver's IRQ handler.
> >>>
> >>> It strangely looks like ipipe_request_irq's idea is similar to what
> >>> request_threaded_irq is already doing (delaying IRQ process later).
> >>>
> >>> -Mathieu
> >> Looks like my bigger problem is that the handler_level_irq is not
> >> called. Only the timer handler is called (handler_percpu_devid_irq).
> >
> > Which may mean that the regular IRQ top half for that interrupt source
> > is not connected to the pipeline. You may want to check whether the
> > irqchip handling that device's IRQs has been made aware of the interrupt
> > pipeline.
> >
>
> Thanks for replying Philippe,
> This is the think, I did change the arch_irq_default_handler to call the
> __ipipe_grab_irq and __ipipe_grab_ipi.
> Is that what you are referring to when you say "interrupt source is not
> connected to the pipile", that's what __ipipe_grab_xxx does isn't it?
>
> Obviously I am still missing something.
> If I use irq_set_chained_handler in the driver then the handler gets
> called but it's just replacing the handler_irq by the driver one.
> When I use request_irq then it does not call my handler (the
> action.handler one).
> I will keep looking.
This is explained here:
http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/#GPIOs_as_interrupt_sources
and here:
http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/#CONFIG_MULTI_IRQ_HANDLER
Chained handlers have to call ipipe_handle_demuxed_irq instead of
generic_handle_irq.
And the arch irq handler has to call ipipe_handle_multi_irq or
ipipe_handle_multi_ipi instead of handle_IRQ
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq)
2015-11-04 7:04 ` Gilles Chanteperdrix
@ 2015-11-05 0:51 ` Mathieu Rondonneau
0 siblings, 0 replies; 11+ messages in thread
From: Mathieu Rondonneau @ 2015-11-05 0:51 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On 15-11-03 11:04 PM, Gilles Chanteperdrix wrote:
> On Tue, Nov 03, 2015 at 07:18:37PM -0800, Mathieu Rondonneau wrote:
>> On 15-11-02 07:15 AM, Philippe Gerum wrote:
>>> On 11/02/2015 06:23 AM, Mathieu Rondonneau wrote:
>>>> On 15-11-01 07:21 PM, Mathieu Rondonneau wrote:
>>>>> On 15-11-01 06:58 PM, Mathieu Rondonneau wrote:
>>>>>> On 15-10-31 08:58 PM, Mathieu Rondonneau wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> irq handlers registered with devm_request_threaded_irq does not get
>>>>>>> triggered when interrupt fires.
>>>>>>>
>>>>>>> The mmc driver uses this (can not load the rootfs).
>>>>>>> Only the IPIPE patch is enabled.
>>>>>>> the armctrl chipirq is triggering the .ack handler instead so the
>>>>>>> interrupt is happening.
>>>>>>>
>>>>>>> Any suggestion on where I should look? how is this supported by the
>>>>>>> ipipe layer?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> -Mathieu
>>>>>>
>>>>>> I think I might have answered my own question.
>>>>>> Looks like I need to use ipipe_request_irq() instead.
>>>>>>
>>>>>> Regards,
>>>>>> -Mathieu
>>>>> mmmm it is not true, it seems we still need a
>>>>> ipipe_request_threaded_irq() to call the ackfn, put the handler in the
>>>>> queue and wake up the thread once handler is executed. Or user will have
>>>>> to move this functionality into their driver's IRQ handler.
>>>>>
>>>>> It strangely looks like ipipe_request_irq's idea is similar to what
>>>>> request_threaded_irq is already doing (delaying IRQ process later).
>>>>>
>>>>> -Mathieu
>>>> Looks like my bigger problem is that the handler_level_irq is not
>>>> called. Only the timer handler is called (handler_percpu_devid_irq).
>>>
>>> Which may mean that the regular IRQ top half for that interrupt source
>>> is not connected to the pipeline. You may want to check whether the
>>> irqchip handling that device's IRQs has been made aware of the interrupt
>>> pipeline.
>>>
>>
>> Thanks for replying Philippe,
>> This is the think, I did change the arch_irq_default_handler to call the
>> __ipipe_grab_irq and __ipipe_grab_ipi.
>> Is that what you are referring to when you say "interrupt source is not
>> connected to the pipile", that's what __ipipe_grab_xxx does isn't it?
>>
>> Obviously I am still missing something.
>> If I use irq_set_chained_handler in the driver then the handler gets
>> called but it's just replacing the handler_irq by the driver one.
>> When I use request_irq then it does not call my handler (the
>> action.handler one).
>> I will keep looking.
>
> This is explained here:
> http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/#GPIOs_as_interrupt_sources
> and here:
> http://xenomai.org/2014/09/porting-xenomai-dual-kernel-to-a-new-arm-soc/#CONFIG_MULTI_IRQ_HANDLER
>
> Chained handlers have to call ipipe_handle_demuxed_irq instead of
> generic_handle_irq.
> And the arch irq handler has to call ipipe_handle_multi_irq or
> ipipe_handle_multi_ipi instead of handle_IRQ
>
Thanks Gilles for the pointers,
MULTI_IRQ_HANDLER is not enabled for RPI2 (so I did not look at the
multi_irq_handler section), is it a requirement for the ipipe patch to work?
For GPIO I got it to work, but it is easier to me because they have
their own irqchip.
It is the arch irq handler that cause me trouble.
Maybe I just have to enable MULTI_IRQ_HANDLER.
I will play around with it.
Thanks again for your feedback, it helps,
Regards,
-Mathieu
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-11-05 0:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-01 3:58 [Xenomai] Support for Raspberry PI 2 B (devm_request_threaded_irq) Mathieu Rondonneau
2015-11-02 16:27 ` Gilles Chanteperdrix
2015-11-04 3:11 ` Mathieu Rondonneau
[not found] <56358DE3.8030308@hotmail.com>
2015-11-02 2:58 ` Mathieu Rondonneau
2015-11-02 3:21 ` Mathieu Rondonneau
2015-11-02 5:23 ` Mathieu Rondonneau
2015-11-02 15:15 ` Philippe Gerum
2015-11-04 3:18 ` Mathieu Rondonneau
2015-11-04 7:04 ` Gilles Chanteperdrix
2015-11-05 0:51 ` Mathieu Rondonneau
2015-11-02 15:12 ` Philippe Gerum
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.