Message-ID: <542C165E.6060809@xenomai.org> Date: Wed, 01 Oct 2014 16:57:34 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <20141001142416.GA4435@csclub.uwaterloo.ca> In-Reply-To: <20141001142416.GA4435@csclub.uwaterloo.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] I-pipe error when requesting irq that is on omap gpio List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lennart Sorensen , xenomai@xenomai.org On 10/01/2014 04:24 PM, 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] [] (unwind_backtrace+0x0/0xf8) from [] (show_stack+0x10/0x14) > [58531.105577] [] (show_stack+0x10/0x14) from [] (dump_stack+0x70/0x8c) > [58531.105594] [] (dump_stack+0x70/0x8c) from [] (ipipe_test_and_stall_root+0x8/0x8c) > [58531.105611] [] (ipipe_test_and_stall_root+0x8/0x8c) from [] (_raw_spin_lock_irqsave+0xc/0x4c) > [58531.105626] [] (_raw_spin_lock_irqsave+0xc/0x4c) from [] (unwind_frame+0x2c4/0x49c) > [58531.105641] [] (unwind_frame+0x2c4/0x49c) from [] (unwind_backtrace+0x80/0xf8) > [58531.105657] [] (unwind_backtrace+0x80/0xf8) from [] (show_stack+0x10/0x14) > [58531.105673] [] (show_stack+0x10/0x14) from [] (dump_stack+0x70/0x8c) > [58531.105689] [] (dump_stack+0x70/0x8c) from [] (warn_slowpath_common+0x68/0x8c) > [58531.105705] [] (warn_slowpath_common+0x68/0x8c) from [] (warn_slowpath_null+0x1c/0x24) > [58531.105721] [] (warn_slowpath_null+0x1c/0x24) from [] (ipipe_set_irq_affinity+0x98/0xd8) > [58531.105783] [] (ipipe_set_irq_affinity+0x98/0xd8) from [] (xnintr_attach+0x2c/0x39c [xeno_nucleus]) > [58531.105907] [] (xnintr_attach+0x2c/0x39c [xeno_nucleus]) from [] (rt_intr_create+0x258/0x4cc [xeno_native]) > [58531.106009] [] (rt_intr_create+0x258/0x4cc [xeno_native]) from [] (__rt_intr_create+0x9c/0x124 [xeno_native]) > [58531.106124] [] (__rt_intr_create+0x9c/0x124 [xeno_native]) from [] (hisyscall_event+0x184/0x34c [xeno_nucleus]) > [58531.106198] [] (hisyscall_event+0x184/0x34c [xeno_nucleus]) from [] (ipipe_syscall_hook+0x68/0xa8) > [58531.106216] [] (ipipe_syscall_hook+0x68/0xa8) from [] (__ipipe_notify_syscall+0x170/0x408) > [58531.106233] [] (__ipipe_notify_syscall+0x170/0x408) from [] (pipeline_syscall+0x8/0x24) > [58531.106336] [] (xnintr_attach+0x2c/0x39c [xeno_nucleus]) from [] (rt_intr_create+0x258/0x4cc [xeno_native]) > [58531.106434] [] (rt_intr_create+0x258/0x4cc [xeno_native]) from [] (__rt_intr_create+0x9c/0x124 [xeno_native]) > [58531.106538] [] (__rt_intr_create+0x9c/0x124 [xeno_native]) from [] (hisyscall_event+0x184/0x34c [xeno_nucleus]) > [58531.106609] [] (hisyscall_event+0x184/0x34c [xeno_nucleus]) from [] (ipipe_syscall_hook+0x68/0xa8) > [58531.106626] [] (ipipe_syscall_hook+0x68/0xa8) from [] (__ipipe_notify_syscall+0x170/0x408) > [58531.106641] [] (__ipipe_notify_syscall+0x170/0x408) from [] (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] [] (unwind_backtrace+0x0/0xf8) from [] (show_stack+0x10/0x14) > [58531.106998] [] (show_stack+0x10/0x14) from [] (dump_stack+0x70/0x8c) > [58531.107007] [] (dump_stack+0x70/0x8c) from [] (warn_slowpath_common+0x68/0x8c) > [58531.107016] [] (warn_slowpath_common+0x68/0x8c) from [] (warn_slowpath_null+0x1c/0x24) > [58531.107025] [] (warn_slowpath_null+0x1c/0x24) from [] (ipipe_set_irq_affinity+0x98/0xd8) > [58531.107034] [] (ipipe_set_irq_affinity+0x98/0xd8) from [] (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). > This is a simple warning which should be harmless, it should not prevent the irq from working. Now we had an old issue on ARM, which is that an irq line should be enabled before using it, the simplest way to get it enabled being to call request_irq before rtdm_irq_request. Maybe this issue we believed fixed is still there? -- Gilles.