All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] rtdm_irq_request not registering irq
@ 2015-02-16  4:58 JAY KOTHARI
  2015-02-16  9:25 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 10+ messages in thread
From: JAY KOTHARI @ 2015-02-16  4:58 UTC (permalink / raw)
  To: xenomai

Hello,
         I am requesting interrupt with rtdm_irq_request. API works
without error but not irq is not working. When I look into dmesg I get
back-trace of this API but no error. I even looked in /proc/interrupts
but no sign of registration. What might be wrong with this API for
me??

Jay Kothari


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16  4:58 [Xenomai] rtdm_irq_request not registering irq JAY KOTHARI
@ 2015-02-16  9:25 ` Gilles Chanteperdrix
  2015-02-16  9:52   ` JAY KOTHARI
  2015-02-17 17:33   ` Lennart Sorensen
  0 siblings, 2 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-16  9:25 UTC (permalink / raw)
  To: JAY KOTHARI; +Cc: xenomai

On Mon, Feb 16, 2015 at 10:28:51AM +0530, JAY KOTHARI wrote:
> Hello,
>          I am requesting interrupt with rtdm_irq_request. API works
> without error but not irq is not working. When I look into dmesg I get
> back-trace of this API but no error. I even looked in /proc/interrupts
> but no sign of registration. What might be wrong with this API for
> me??

You will not see an interrupt registered with rtdm_irq_request in
/proc/interrupts, /proc/interrupts lists interrupts registered with
request_irq. An interrupt registered with rtdm_irq_request appears
in /proc/xenomai/irq.

Does exactly the same irq number work when requesting it with
request_irq ?

If no, then you may have made an error in the irq number: Linux irqs
are now remapped and the irq number passed to request_irq may not be
the same as the hardware irq number you would expect.

If yes, then are you running xenomai on an arm platform? If yes, we
have a very old bug which has been fixed only recently, normally,
requesting the irq both with request_irq and rtrm_irq_request should
avoid this bug.

-- 
					    Gilles.


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16  9:25 ` Gilles Chanteperdrix
@ 2015-02-16  9:52   ` JAY KOTHARI
  2015-02-16 10:01     ` Gilles Chanteperdrix
  2015-02-17 17:33   ` Lennart Sorensen
  1 sibling, 1 reply; 10+ messages in thread
From: JAY KOTHARI @ 2015-02-16  9:52 UTC (permalink / raw)
  To: xenomai

I am using beaglebone black with Linux 3.8.13 and Xenomai 2.6.3. In
the original Linux driver (without RTDM driver) they are implementing
same irq_number for request_irq API. So I believe the same irq number
must work for rtdm_irq_request in my RTDM driver.

I looked into /proc/xenomai/irq my irq is shown registered but its not working.

How I use to  request_irq and rtrm_irq_request together to solve this
approach?? Do you mean I request irq with both api??
Then how do I implement irq handler and get argument like
dev_id(request_irq) or void * arg(rtdm_irq_request)????

Jay Kothari

On 2/16/15, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> On Mon, Feb 16, 2015 at 10:28:51AM +0530, JAY KOTHARI wrote:
>> Hello,
>>          I am requesting interrupt with rtdm_irq_request. API works
>> without error but not irq is not working. When I look into dmesg I get
>> back-trace of this API but no error. I even looked in /proc/interrupts
>> but no sign of registration. What might be wrong with this API for
>> me??
>
> You will not see an interrupt registered with rtdm_irq_request in
> /proc/interrupts, /proc/interrupts lists interrupts registered with
> request_irq. An interrupt registered with rtdm_irq_request appears
> in /proc/xenomai/irq.
>
> Does exactly the same irq number work when requesting it with
> request_irq ?
>
> If no, then you may have made an error in the irq number: Linux irqs
> are now remapped and the irq number passed to request_irq may not be
> the same as the hardware irq number you would expect.
>
> If yes, then are you running xenomai on an arm platform? If yes, we
> have a very old bug which has been fixed only recently, normally,
> requesting the irq both with request_irq and rtrm_irq_request should
> avoid this bug.
>
> --
> 					    Gilles.
>


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16  9:52   ` JAY KOTHARI
@ 2015-02-16 10:01     ` Gilles Chanteperdrix
  2015-02-16 10:40       ` JAY KOTHARI
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-16 10:01 UTC (permalink / raw)
  To: JAY KOTHARI; +Cc: xenomai

On Mon, Feb 16, 2015 at 03:22:07PM +0530, JAY KOTHARI wrote:
> I am using beaglebone black with Linux 3.8.13 and Xenomai 2.6.3.

There is no reason to use Xenomai 2.6.3, you should be using xenomai
2.6.4. Both releases are ABI compatible.

> In
> the original Linux driver (without RTDM driver) they are implementing
> same irq_number for request_irq API. So I believe the same irq number
> must work for rtdm_irq_request in my RTDM driver.
> 
> I looked into /proc/xenomai/irq my irq is shown registered but its not working.
> 
> How I use to  request_irq and rtrm_irq_request together to solve this
> approach?? Do you mean I request irq with both api??
> Then how do I implement irq handler and get argument like
> dev_id(request_irq) or void * arg(rtdm_irq_request)????

Please, no top posting. No need for bazillions of question marks
either.

Yes, I mean request the irq with both API, pass a dummy handler to
request_irq, it will never be called anyway if the handler
registered with rtdm_irq_request do not return XN_ISR_PROPAGATE.

-- 
					    Gilles.


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16 10:01     ` Gilles Chanteperdrix
@ 2015-02-16 10:40       ` JAY KOTHARI
  2015-02-16 10:48         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 10+ messages in thread
From: JAY KOTHARI @ 2015-02-16 10:40 UTC (permalink / raw)
  To: xenomai

On 2/16/15, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> On Mon, Feb 16, 2015 at 03:22:07PM +0530, JAY KOTHARI wrote:
>> I am using beaglebone black with Linux 3.8.13 and Xenomai 2.6.3.
>
> There is no reason to use Xenomai 2.6.3, you should be using xenomai
> 2.6.4. Both releases are ABI compatible.
>
>> In
>> the original Linux driver (without RTDM driver) they are implementing
>> same irq_number for request_irq API. So I believe the same irq number
>> must work for rtdm_irq_request in my RTDM driver.
>>
>> I looked into /proc/xenomai/irq my irq is shown registered but its not
>> working.
>>
>> How I use to  request_irq and rtrm_irq_request together to solve this
>> approach?? Do you mean I request irq with both api??
>> Then how do I implement irq handler and get argument like
>> dev_id(request_irq) or void * arg(rtdm_irq_request)????
>
> Please, no top posting. No need for bazillions of question marks
> either.
>
Sorry for it.

> Yes, I mean request the irq with both API, pass a dummy handler to
> request_irq, it will never be called anyway if the handler
> registered with rtdm_irq_request do not return XN_ISR_PROPAGATE.
>

Again I have query about rtdm_irq_request. As my RTDM driver is not
getting interrupted then how will it go into handler of
rtdm_irq_request and return XN_ISR_PROPAGATE? Interrupt is registered
in /proc/xenomai/isr but not responding.

Thank you

Jay Kothari


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16 10:40       ` JAY KOTHARI
@ 2015-02-16 10:48         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-16 10:48 UTC (permalink / raw)
  To: JAY KOTHARI; +Cc: xenomai

On Mon, Feb 16, 2015 at 04:10:56PM +0530, JAY KOTHARI wrote:
> On 2/16/15, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
> > On Mon, Feb 16, 2015 at 03:22:07PM +0530, JAY KOTHARI wrote:
> >> I am using beaglebone black with Linux 3.8.13 and Xenomai 2.6.3.
> >
> > There is no reason to use Xenomai 2.6.3, you should be using xenomai
> > 2.6.4. Both releases are ABI compatible.
> >
> >> In
> >> the original Linux driver (without RTDM driver) they are implementing
> >> same irq_number for request_irq API. So I believe the same irq number
> >> must work for rtdm_irq_request in my RTDM driver.
> >>
> >> I looked into /proc/xenomai/irq my irq is shown registered but its not
> >> working.
> >>
> >> How I use to  request_irq and rtrm_irq_request together to solve this
> >> approach?? Do you mean I request irq with both api??
> >> Then how do I implement irq handler and get argument like
> >> dev_id(request_irq) or void * arg(rtdm_irq_request)????
> >
> > Please, no top posting. No need for bazillions of question marks
> > either.
> >
> Sorry for it.
> 
> > Yes, I mean request the irq with both API, pass a dummy handler to
> > request_irq, it will never be called anyway if the handler
> > registered with rtdm_irq_request do not return XN_ISR_PROPAGATE.
> >
> 
> Again I have query about rtdm_irq_request. As my RTDM driver is not
> getting interrupted then how will it go into handler of
> rtdm_irq_request and return XN_ISR_PROPAGATE? Interrupt is registered
> in /proc/xenomai/isr but not responding.

You have misunderstood my answer. Please read it again.

-- 
					    Gilles.


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-16  9:25 ` Gilles Chanteperdrix
  2015-02-16  9:52   ` JAY KOTHARI
@ 2015-02-17 17:33   ` Lennart Sorensen
  2015-02-17 18:11     ` Gilles Chanteperdrix
  1 sibling, 1 reply; 10+ messages in thread
From: Lennart Sorensen @ 2015-02-17 17:33 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: JAY KOTHARI, xenomai

On Mon, Feb 16, 2015 at 10:25:13AM +0100, Gilles Chanteperdrix wrote:
> On Mon, Feb 16, 2015 at 10:28:51AM +0530, JAY KOTHARI wrote:
> > Hello,
> >          I am requesting interrupt with rtdm_irq_request. API works
> > without error but not irq is not working. When I look into dmesg I get
> > back-trace of this API but no error. I even looked in /proc/interrupts
> > but no sign of registration. What might be wrong with this API for
> > me??
> 
> You will not see an interrupt registered with rtdm_irq_request in
> /proc/interrupts, /proc/interrupts lists interrupts registered with
> request_irq. An interrupt registered with rtdm_irq_request appears
> in /proc/xenomai/irq.
> 
> Does exactly the same irq number work when requesting it with
> request_irq ?
> 
> If no, then you may have made an error in the irq number: Linux irqs
> are now remapped and the irq number passed to request_irq may not be
> the same as the hardware irq number you would expect.
> 
> If yes, then are you running xenomai on an arm platform? If yes, we
> have a very old bug which has been fixed only recently, normally,
> requesting the irq both with request_irq and rtrm_irq_request should
> avoid this bug.

Is there a git commit number for that fix?  I am curious if that would
make some things work better for us.

-- 
Len Sorensen


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-17 17:33   ` Lennart Sorensen
@ 2015-02-17 18:11     ` Gilles Chanteperdrix
  2015-02-17 18:19       ` Lennart Sorensen
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-17 18:11 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: JAY KOTHARI, xenomai

On Tue, Feb 17, 2015 at 12:33:14PM -0500, Lennart Sorensen wrote:
> On Mon, Feb 16, 2015 at 10:25:13AM +0100, Gilles Chanteperdrix wrote:
> > On Mon, Feb 16, 2015 at 10:28:51AM +0530, JAY KOTHARI wrote:
> > > Hello,
> > >          I am requesting interrupt with rtdm_irq_request. API works
> > > without error but not irq is not working. When I look into dmesg I get
> > > back-trace of this API but no error. I even looked in /proc/interrupts
> > > but no sign of registration. What might be wrong with this API for
> > > me??
> > 
> > You will not see an interrupt registered with rtdm_irq_request in
> > /proc/interrupts, /proc/interrupts lists interrupts registered with
> > request_irq. An interrupt registered with rtdm_irq_request appears
> > in /proc/xenomai/irq.
> > 
> > Does exactly the same irq number work when requesting it with
> > request_irq ?
> > 
> > If no, then you may have made an error in the irq number: Linux irqs
> > are now remapped and the irq number passed to request_irq may not be
> > the same as the hardware irq number you would expect.
> > 
> > If yes, then are you running xenomai on an arm platform? If yes, we
> > have a very old bug which has been fixed only recently, normally,
> > requesting the irq both with request_irq and rtrm_irq_request should
> > avoid this bug.
> 
> Is there a git commit number for that fix?  I am curious if that would
> make some things work better for us.

in 3.x

https://git.xenomai.org/xenomai-3.git/commit/?id=a8d0efffc57464b03e93e0d0f4308a34faed21c2

not yet fixed in 2.6 git.

And if your irq chip uses the irq_startup callback:

https://git.xenomai.org/ipipe.git/commit/?id=b3f0bfe5fb1ee0ae079e281b44e591745d1c6c61

-- 
					    Gilles.


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-17 18:11     ` Gilles Chanteperdrix
@ 2015-02-17 18:19       ` Lennart Sorensen
  2015-02-20 12:46         ` JAY KOTHARI
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Sorensen @ 2015-02-17 18:19 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: JAY KOTHARI, xenomai

On Tue, Feb 17, 2015 at 07:11:33PM +0100, Gilles Chanteperdrix wrote:
> in 3.x
> 
> https://git.xenomai.org/xenomai-3.git/commit/?id=a8d0efffc57464b03e93e0d0f4308a34faed21c2
> 
> not yet fixed in 2.6 git.

OK, so that's a surprisingly small change for that bug.  I think it
makes sense.

> And if your irq chip uses the irq_startup callback:
> 
> https://git.xenomai.org/ipipe.git/commit/?id=b3f0bfe5fb1ee0ae079e281b44e591745d1c6c61

Ok, I thought it might be related.  Makes a lot of sense now.  I always
thought it odd that request_irq seemed to be required in addition to the
realtime call.  Nice to know why that was needed and that in the future
it won't be.

-- 
Len Sorensen


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

* Re: [Xenomai] rtdm_irq_request not registering irq
  2015-02-17 18:19       ` Lennart Sorensen
@ 2015-02-20 12:46         ` JAY KOTHARI
  0 siblings, 0 replies; 10+ messages in thread
From: JAY KOTHARI @ 2015-02-20 12:46 UTC (permalink / raw)
  To: xenomai

     I am using devm_request_irq() with rtdm_irq_request , rtdm driver
is loading fine but when I call it with application,application gets
hanged on interrupt. The same driver when I register with
devm_request_irq() its working okay. What might occurred this hang?

    As per suggestion I register a dummy handler of devm_request_irq()
which return IRQ_HANDLED while rtdm_irq_request does the main job for
my driver.

Jay Kothari


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

end of thread, other threads:[~2015-02-20 12:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-16  4:58 [Xenomai] rtdm_irq_request not registering irq JAY KOTHARI
2015-02-16  9:25 ` Gilles Chanteperdrix
2015-02-16  9:52   ` JAY KOTHARI
2015-02-16 10:01     ` Gilles Chanteperdrix
2015-02-16 10:40       ` JAY KOTHARI
2015-02-16 10:48         ` Gilles Chanteperdrix
2015-02-17 17:33   ` Lennart Sorensen
2015-02-17 18:11     ` Gilles Chanteperdrix
2015-02-17 18:19       ` Lennart Sorensen
2015-02-20 12:46         ` JAY KOTHARI

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.