From: Philippe Gerum <rpm@xenomai.org>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>, xenomai@xenomai.org
Subject: Re: [Xenomai] I-pipe error when requesting irq that is on omap gpio
Date: Fri, 07 Nov 2014 19:43:30 +0100 [thread overview]
Message-ID: <545D12D2.2020104@xenomai.org> (raw)
In-Reply-To: <20141107182600.GS24110@csclub.uwaterloo.ca>
On 11/07/2014 07:26 PM, Lennart Sorensen wrote:
> On Wed, Oct 01, 2014 at 10:24:16AM -0400, Lennart Sorensen wrote:
>> I tried using an omap-gpio as an interrupt in xenomai and got this message when registering it:
>>
>> [58531.105521] I-pipe: Detected illicit call from head domain 'Xenomai'
>> [58531.105521] into a regular Linux service
>> [58531.105538] CPU: 0 PID: 9816 Comm: StartTask Tainted: G O 3.12-1-am5726 #1 Debian 3.12.27-0.1RR6
>> [58531.105558] [<c0016410>] (unwind_backtrace+0x0/0xf8) from [<c001286c>] (show_stack+0x10/0x14)
>> [58531.105577] [<c001286c>] (show_stack+0x10/0x14) from [<c0440784>] (dump_stack+0x70/0x8c)
>> [58531.105594] [<c0440784>] (dump_stack+0x70/0x8c) from [<c001a55c>] (ipipe_test_and_stall_root+0x8/0x8c)
>> [58531.105611] [<c001a55c>] (ipipe_test_and_stall_root+0x8/0x8c) from [<c04449c4>] (_raw_spin_lock_irqsave+0xc/0x4c)
>> [58531.105626] [<c04449c4>] (_raw_spin_lock_irqsave+0xc/0x4c) from [<c0016238>] (unwind_frame+0x2c4/0x49c)
>> [58531.105641] [<c0016238>] (unwind_frame+0x2c4/0x49c) from [<c0016490>] (unwind_backtrace+0x80/0xf8)
>> [58531.105657] [<c0016490>] (unwind_backtrace+0x80/0xf8) from [<c001286c>] (show_stack+0x10/0x14)
>> [58531.105673] [<c001286c>] (show_stack+0x10/0x14) from [<c0440784>] (dump_stack+0x70/0x8c)
>> [58531.105689] [<c0440784>] (dump_stack+0x70/0x8c) from [<c0040060>] (warn_slowpath_common+0x68/0x8c)
>> [58531.105705] [<c0040060>] (warn_slowpath_common+0x68/0x8c) from [<c00400a0>] (warn_slowpath_null+0x1c/0x24)
>> [58531.105721] [<c00400a0>] (warn_slowpath_null+0x1c/0x24) from [<c001a308>] (ipipe_set_irq_affinity+0x98/0xd8)
>> [58531.105783] [<c001a308>] (ipipe_set_irq_affinity+0x98/0xd8) from [<bf0a689c>] (xnintr_attach+0x2c/0x39c [xeno_nucleus])
>> [58531.105907] [<bf0a689c>] (xnintr_attach+0x2c/0x39c [xeno_nucleus]) from [<bf1510cc>] (rt_intr_create+0x258/0x4cc [xeno_native])
>> [58531.106009] [<bf1510cc>] (rt_intr_create+0x258/0x4cc [xeno_native]) from [<bf132de8>] (__rt_intr_create+0x9c/0x124 [xeno_native])
>> [58531.106124] [<bf132de8>] (__rt_intr_create+0x9c/0x124 [xeno_native]) from [<bf0c2658>] (hisyscall_event+0x184/0x34c [xeno_nucleus])
>> [58531.106198] [<bf0c2658>] (hisyscall_event+0x184/0x34c [xeno_nucleus]) from [<c00afb9c>] (ipipe_syscall_hook+0x68/0xa8)
>> [58531.106216] [<c00afb9c>] (ipipe_syscall_hook+0x68/0xa8) from [<c00ae698>] (__ipipe_notify_syscall+0x170/0x408)
>> [58531.106233] [<c00ae698>] (__ipipe_notify_syscall+0x170/0x408) from [<c000eefc>] (pipeline_syscall+0x8/0x24)
>> [58531.106336] [<bf0a689c>] (xnintr_attach+0x2c/0x39c [xeno_nucleus]) from [<bf1510cc>] (rt_intr_create+0x258/0x4cc [xeno_native])
>> [58531.106434] [<bf1510cc>] (rt_intr_create+0x258/0x4cc [xeno_native]) from [<bf132de8>] (__rt_intr_create+0x9c/0x124 [xeno_native])
>> [58531.106538] [<bf132de8>] (__rt_intr_create+0x9c/0x124 [xeno_native]) from [<bf0c2658>] (hisyscall_event+0x184/0x34c [xeno_nucleus])
>> [58531.106609] [<bf0c2658>] (hisyscall_event+0x184/0x34c [xeno_nucleus]) from [<c00afb9c>] (ipipe_syscall_hook+0x68/0xa8)
>> [58531.106626] [<c00afb9c>] (ipipe_syscall_hook+0x68/0xa8) from [<c00ae698>] (__ipipe_notify_syscall+0x170/0x408)
>> [58531.106641] [<c00ae698>] (__ipipe_notify_syscall+0x170/0x408) from [<c000eefc>] (pipeline_syscall+0x8/0x24)
>> [58531.106652] ---[ end trace dff1d3990fff1b03 ]---
>> [58531.106718] ------------[ cut here ]------------
>> [58531.106729] WARNING: CPU: 0 PID: 9816 at /tmp/linux/linux-3.12.27.rr1/arch/arm/kernel/ipipe.c:158 ipipe_set_irq_affinity+0x98/0xd8(
>> )
>> [58531.106738] Modules linked in: 8021q garp stp mrp llc l2tp_eth l2tp_netlink l2tp_core ip_gre ip_tunnel gre macvlan ti_pru_eth rcksa
>> pi_layer2(O) iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack dummy xeno_posix xeno_rtdm xeno_native xeno_
>> nucleus max6369_wdt iptable_filter ip_tables x_tables xhci_hcd dwc3 ahci_platform omap_aes phy_omap_usb2 phy_omap_pipe3 phy_omap_contr
>> ol dwc3_omap lm75 [last unloaded: xfrm_user]
>> [58531.106980] CPU: 0 PID: 9816 Comm: StartTask Tainted: G O 3.12-1-am5726 #1 Debian 3.12.27-0.1RR6
>> [58531.106990] [<c0016410>] (unwind_backtrace+0x0/0xf8) from [<c001286c>] (show_stack+0x10/0x14)
>> [58531.106998] [<c001286c>] (show_stack+0x10/0x14) from [<c0440784>] (dump_stack+0x70/0x8c)
>> [58531.107007] [<c0440784>] (dump_stack+0x70/0x8c) from [<c0040060>] (warn_slowpath_common+0x68/0x8c)
>> [58531.107016] [<c0040060>] (warn_slowpath_common+0x68/0x8c) from [<c00400a0>] (warn_slowpath_null+0x1c/0x24)
>> [58531.107025] [<c00400a0>] (warn_slowpath_null+0x1c/0x24) from [<c001a308>] (ipipe_set_irq_affinity+0x98/0xd8)
>> [58531.107034] [<c001a308>] (ipipe_set_irq_affinity+0x98/0xd8) from [<bf0a689c>] (xnintr_attach+0x2c/0x39c [xeno_nucleus])
>>
>> I saw ipipe patches in the gpio-omap.c but maybe something is still
>> missing.
>>
>> Any ideas?
>>
>> Of course it may be that our code is used to running on an older xenomai
>> where it first called request_irq and then xenomai took over the irq
>> handling. I wish the person that wrote that code still worked here to
>> explain why that was done.
>>
>> If I don't use the gpio irq but instead use an irq that is one level
>> lower, then I get no such error message (although the pin isn't setup
>> properly either then so it doesn't actually work either).
>
> I discovered that if I comment out:
>
> #ifdef CONFIG_SMP
> xnarch_set_irq_affinity(intr->irq, nkaffinity);
> #endif /* CONFIG_SMP */
>
> I stop getting the huge backtrace and warning about calling a linux
> service from xenomai.
For this particular issue, Xenomai 2.x is deadly wrong. Creating,
deleting, enabling or disabling an IRQ channel must be done from
secondary mode. The syscall mode bits for these native API calls are
wrong, should be as follows instead:
diff --git a/ksrc/skins/native/syscall.c b/ksrc/skins/native/syscall.c
index 950b092..dff7f4d 100644
--- a/ksrc/skins/native/syscall.c
+++ b/ksrc/skins/native/syscall.c
@@ -4145,12 +4145,12 @@ static xnsysent_t __systab[] = {
[__native_alarm_stop] = {&__rt_alarm_stop, __xn_exec_any},
[__native_alarm_wait] = {&__rt_alarm_wait, __xn_exec_primary},
[__native_alarm_inquire] = {&__rt_alarm_inquire, __xn_exec_any},
- [__native_intr_create] = {&__rt_intr_create, __xn_exec_any},
+ [__native_intr_create] = {&__rt_intr_create, __xn_exec_lostage},
[__native_intr_bind] = {&__rt_intr_bind, __xn_exec_conforming},
- [__native_intr_delete] = {&__rt_intr_delete, __xn_exec_any},
+ [__native_intr_delete] = {&__rt_intr_delete, __xn_exec_lostage},
[__native_intr_wait] = {&__rt_intr_wait, __xn_exec_primary},
- [__native_intr_enable] = {&__rt_intr_enable, __xn_exec_any},
- [__native_intr_disable] = {&__rt_intr_disable, __xn_exec_any},
+ [__native_intr_enable] = {&__rt_intr_enable, __xn_exec_lostage},
+ [__native_intr_disable] = {&__rt_intr_disable, __xn_exec_lostage},
[__native_intr_inquire] = {&__rt_intr_inquire, __xn_exec_any},
[__native_pipe_create] = {&__rt_pipe_create, __xn_exec_lostage},
[__native_pipe_bind] = {&__rt_pipe_bind, __xn_exec_conforming},
--
Philippe.
next prev parent reply other threads:[~2014-11-07 18:43 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 14:24 [Xenomai] I-pipe error when requesting irq that is on omap gpio Lennart Sorensen
2014-10-01 14:57 ` Gilles Chanteperdrix
2014-10-01 15:02 ` Lennart Sorensen
2014-10-01 15:28 ` Gilles Chanteperdrix
2014-10-01 15:46 ` Lennart Sorensen
2014-10-01 15:52 ` Lennart Sorensen
2014-10-01 16:02 ` Lennart Sorensen
2014-10-01 17:31 ` Gilles Chanteperdrix
2014-10-01 17:40 ` Lennart Sorensen
2014-10-01 17:46 ` Gilles Chanteperdrix
2014-10-01 17:54 ` Lennart Sorensen
2014-10-01 20:33 ` Lennart Sorensen
2014-10-01 21:39 ` Gilles Chanteperdrix
2014-10-01 21:43 ` Lennart Sorensen
2014-10-02 13:56 ` [Xenomai] Xenomai on Cortex R (or Rreal Time) family mobin Motallebizadeh
2014-10-02 14:00 ` Gilles Chanteperdrix
2014-10-02 14:22 ` mobin Motallebizadeh
2014-10-02 14:26 ` Lennart Sorensen
2014-10-02 19:34 ` [Xenomai] I-pipe error when requesting irq that is on omap gpio Lennart Sorensen
2014-11-07 18:26 ` Lennart Sorensen
2014-11-07 18:43 ` Philippe Gerum [this message]
2014-11-07 20:21 ` Lennart Sorensen
2014-11-07 20:24 ` Lennart Sorensen
2014-11-07 20:32 ` Gilles Chanteperdrix
2014-11-07 21:26 ` Lennart Sorensen
2014-11-17 19:12 ` Lennart Sorensen
2014-11-17 19:44 ` Philippe Gerum
2014-11-17 20:11 ` Lennart Sorensen
2014-11-17 20:14 ` Gilles Chanteperdrix
2014-11-17 20:24 ` Lennart Sorensen
2014-11-17 20:27 ` Gilles Chanteperdrix
2014-11-17 21:47 ` Lennart Sorensen
2014-11-17 21:54 ` Gilles Chanteperdrix
2014-11-17 22:10 ` Lennart Sorensen
2014-11-17 22:15 ` Gilles Chanteperdrix
2014-11-18 15:24 ` Lennart Sorensen
2014-11-18 15:26 ` Gilles Chanteperdrix
2014-11-18 18:48 ` Lennart Sorensen
2014-11-18 18:51 ` Gilles Chanteperdrix
2014-11-18 18:56 ` Lennart Sorensen
2014-11-18 19:00 ` Gilles Chanteperdrix
2014-11-18 19:24 ` Lennart Sorensen
2014-11-18 19:28 ` Gilles Chanteperdrix
2014-11-18 20:28 ` Gilles Chanteperdrix
2014-11-18 20:53 ` Lennart Sorensen
2014-11-18 20:56 ` Gilles Chanteperdrix
2014-11-18 21:17 ` Gilles Chanteperdrix
2014-11-18 21:39 ` Lennart Sorensen
2014-11-18 22:05 ` Gilles Chanteperdrix
2014-11-18 22:31 ` Lennart Sorensen
2014-11-19 5:40 ` Gilles Chanteperdrix
2014-11-19 17:12 ` Lennart Sorensen
2014-11-19 22:38 ` Gilles Chanteperdrix
2014-11-20 20:01 ` Lennart Sorensen
2014-11-20 20:06 ` Gilles Chanteperdrix
2014-11-20 22:38 ` Lennart Sorensen
2014-11-20 22:41 ` Gilles Chanteperdrix
2014-11-21 7:59 ` Gilles Chanteperdrix
2014-11-21 15:11 ` Lennart Sorensen
2014-11-18 19:14 ` Gilles Chanteperdrix
2014-11-18 19:25 ` Lennart Sorensen
2014-11-18 19:46 ` Gilles Chanteperdrix
2014-11-18 21:48 ` Lennart Sorensen
2014-11-17 20:30 ` Gilles Chanteperdrix
2014-11-17 20:43 ` Lennart Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545D12D2.2020104@xenomai.org \
--to=rpm@xenomai.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.