* [Xenomai-help] IRQ issue
@ 2012-01-06 14:11 Terry Fryar
2012-01-06 15:04 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Terry Fryar @ 2012-01-06 14:11 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]
Using Xen 2.6 with 2.6.38 kernel, have a kernel module with an ISR
registered using rtdm_irq_request() that schedules a work queue. This queue
thread makes an spi call.
All seems to work fine, but I'm seeing this message periodically:
[ 4465.323999] Xenomai: unlocking unlocked nucleus lock c0bc79c8 on CPU #0
[ 4465.324010] owner = kernel/xenomai/nucleus/intr.c:450
(xnintr_irq_handler(), CPU #0)
[ 4465.340102] [<c00572ac>] (unwind_backtrace+0x0/0xe0) from [<c0055078>]
(show_stack+0x10/0x14)
[ 4465.349080] [<c0055078>] (show_stack+0x10/0x14) from [<c00e1a20>]
(xnintr_irq_handler+0x210/0x3a0)
[ 4465.358524] [<c00e1a20>] (xnintr_irq_handler+0x210/0x3a0) from
[<c00c16dc>] (__ipipe_dispatch_wired_nocheck+0x50/0xa0)
[ 4465.369770] [<c00c16dc>] (__ipipe_dispatch_wired_nocheck+0x50/0xa0) from
[<c006f5f8>] (gpio_demux_inner+0x3c/0x54)
[ 4465.380700] [<c006f5f8>] (gpio_demux_inner+0x3c/0x54) from [<c006f73c>]
(gpio_irq_handler+0x12c/0x168)
[ 4465.390537] [<c006f73c>] (gpio_irq_handler+0x12c/0x168) from [<c0058cb0>]
(__ipipe_handle_irq+0xf0/0x154)
[ 4465.400649] [<c0058cb0>] (__ipipe_handle_irq+0xf0/0x154) from
[<c0058db8>] (__ipipe_grab_irq+0x48/0x64)
[ 4465.410576] [<c0058db8>] (__ipipe_grab_irq+0x48/0x64) from [<c0465bc4>]
(__irq_svc+0x44/0xe8)
[ 4465.419589] [<c0465bc4>] (__irq_svc+0x44/0xe8) from [<c00c189c>]
(__ipipe_unstall_root+0x2c/0x34)
[ 4465.428959] [<c00c189c>] (__ipipe_unstall_root+0x2c/0x34) from
[<c005243c>] (cpu_idle+0x8c/0xe4)
[ 4465.438243] [<c005243c>] (cpu_idle+0x8c/0xe4) from [<c00088bc>]
(start_kernel+0x2b0/0x30c)
[ 4465.446938] [<c00088bc>] (start_kernel+0x2b0/0x30c) from [<80008034>]
(0x80008034)
Not sure what this one means?? I see the "cpu_idle", and I vaguely recall
some issue with that....but I don't remember what this was?
[-- Attachment #2: Type: text/html, Size: 2957 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] IRQ issue
2012-01-06 14:11 [Xenomai-help] IRQ issue Terry Fryar
@ 2012-01-06 15:04 ` Gilles Chanteperdrix
2012-01-06 17:08 ` Terry Fryar
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2012-01-06 15:04 UTC (permalink / raw)
To: Terry Fryar; +Cc: xenomai
On 01/06/2012 03:11 PM, Terry Fryar wrote:
> Using Xen 2.6 with 2.6.38 kernel, have a kernel module with an ISR
> registered using rtdm_irq_request() that schedules a work queue. This queue
> thread makes an spi call.
If the work queue you schedule is a linux work queue, that is not going
to work, for the same reason as in the last e-mail: you can not call
services interacting with Linux scheduler in xenomai context. So, if you
need an spi driver for real-time drivers or applicaitons, you have to
write one for the RTDM skin without using Linux services. There is no
way around.
> Not sure what this one means?? I see the "cpu_idle", and I vaguely recall
> some issue with that....but I don't remember what this was?
The cpu is idle most of the time, so, the idle function is the function
the most likely to be interrupted by an interrupt.
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] IRQ issue
2012-01-06 15:04 ` Gilles Chanteperdrix
@ 2012-01-06 17:08 ` Terry Fryar
0 siblings, 0 replies; 3+ messages in thread
From: Terry Fryar @ 2012-01-06 17:08 UTC (permalink / raw)
To: 'Gilles Chanteperdrix'; +Cc: xenomai
I guess using the rtdm_irq_request() hooks an ISR that ends up called in the
xenomai context? So I need to use the normal irq_request()
then...ok...sorry to be so dense, I am quite new to writing kernel modules!
Thanks Gilles!
-----Original Message-----
From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
Sent: Friday, January 06, 2012 9:04 AM
To: Terry Fryar
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] IRQ issue
On 01/06/2012 03:11 PM, Terry Fryar wrote:
> Using Xen 2.6 with 2.6.38 kernel, have a kernel module with an ISR
> registered using rtdm_irq_request() that schedules a work queue. This
> queue thread makes an spi call.
If the work queue you schedule is a linux work queue, that is not going to
work, for the same reason as in the last e-mail: you can not call services
interacting with Linux scheduler in xenomai context. So, if you need an spi
driver for real-time drivers or applicaitons, you have to write one for the
RTDM skin without using Linux services. There is no way around.
> Not sure what this one means?? I see the "cpu_idle", and I vaguely
> recall some issue with that....but I don't remember what this was?
The cpu is idle most of the time, so, the idle function is the function the
most likely to be interrupted by an interrupt.
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-06 17:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06 14:11 [Xenomai-help] IRQ issue Terry Fryar
2012-01-06 15:04 ` Gilles Chanteperdrix
2012-01-06 17:08 ` Terry Fryar
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.