* [Xenomai-core] clocktest and cyclictest work but irqloop crashes
@ 2007-10-26 15:05 Steven A. Falco
2007-10-26 17:15 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Steven A. Falco @ 2007-10-26 15:05 UTC (permalink / raw)
To: xenomai
I am testing kernel 2.6.23 ARCH=powerpc with Xenomai 2.4-rc4. The
clocktest and cyclictest work perfectly with the uic/spinlock patches.
However, the irqloop test fails with the Oops shown below.
Steve
# modprobe xeno_irqbench
# lsmod
Module Size Used by Not tainted
xeno_irqbench 9668 0
# /usr/xenomai/bin/irqloop
Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0x00000000
Oops: Kernel access of bad area, sig: 11 [#1]
Netdec
Modules linked in: xeno_irqbench
NIP: 00000000 LR: c016d368 CTR: 00000000
REGS: c0f3dd20 TRAP: 0400 Not tainted (2.6.23)
MSR: 00029030 <EE,ME,IR,DR> CR: 24000488 XER: 00000000
TASK = c032dc00[665] 'irqloop' THREAD: c0f3c000
GPR00: 00000000 c0f3ddd0 c032dc00 00000004 00000000 c0049e50 c02b0000
00000000
GPR08: c0296868 00000000 c028e0cc 00000000 000003ff 1001a8d8 00ff9900
00000001
GPR16: c02c0000 c0f3df50 c02ba360 c02a0000 00000040 fffffff0 00000010
c0296868
GPR24: c02a0000 c02b0000 c0d54898 00000018 c0f3de2c 00000000 00000000
c0d50040
NIP [00000000] 0x0
LR [c016d368] rthal_irq_enable+0x4c/0x64
Call Trace:
[c0f3ddd0] [c0049ad8] xnintr_attach+0xd8/0xf0 (unreliable)
[c0f3dde0] [c0049860] xnintr_enable+0x14/0x24
[c0f3ddf0] [c007cf90] rtdm_irq_request+0x6c/0x94
[c0f3de10] [c201acbc] rt_irqbench_ioctl_nrt+0x5c0/0x654 [xeno_irqbench]
[c0f3de60] [c007bef8] __rt_dev_ioctl+0x80/0x138
[c0f3dea0] [c007de4c] sys_rtdm_ioctl+0x20/0x30
[c0f3deb0] [c0054a80] losyscall_event+0xc8/0x1d0
[c0f3dee0] [c0046d7c] __ipipe_dispatch_event+0xa4/0x208
[c0f3df30] [c0007cc8] __ipipe_syscall_root+0x40/0xf0
[c0f3df40] [c000d92c] DoSyscall+0x20/0x5c
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Segmentation fault
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] clocktest and cyclictest work but irqloop crashes
2007-10-26 15:05 [Xenomai-core] clocktest and cyclictest work but irqloop crashes Steven A. Falco
@ 2007-10-26 17:15 ` Philippe Gerum
2007-10-26 17:54 ` Steven A. Falco
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2007-10-26 17:15 UTC (permalink / raw)
To: Steven A. Falco; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
Steven A. Falco wrote:
> I am testing kernel 2.6.23 ARCH=powerpc with Xenomai 2.4-rc4. The
> clocktest and cyclictest work perfectly with the uic/spinlock patches.
> However, the irqloop test fails with the Oops shown below.
>
Please try the patch below. It looks like the chip descriptor does not implement
any unmask handler, which seems odd. This patch should tell us a bit more about
this issue.
--
Philippe.
[-- Attachment #2: uic-unmask.patch --]
[-- Type: text/x-patch, Size: 483 bytes --]
Index: ksrc/arch/powerpc/hal.c
===================================================================
--- ksrc/arch/powerpc/hal.c (revision 3095)
+++ ksrc/arch/powerpc/hal.c (working copy)
@@ -245,6 +245,11 @@
rthal_irq_desc_status(irq) &= ~IRQ_DISABLED;
+ if (rthal_irq_handlerp(irq)->unmask == NULL) {
+ printk("NULL ->unmask handler, IRQ %d, chip %s\n", irq, rthal_irq_handlerp(irq)->typename);
+ return 0;
+ }
+
return rthal_irq_chip_enable(irq);
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] clocktest and cyclictest work but irqloop crashes
2007-10-26 17:15 ` Philippe Gerum
@ 2007-10-26 17:54 ` Steven A. Falco
2007-10-26 18:03 ` Jan Kiszka
2007-10-26 21:13 ` Philippe Gerum
0 siblings, 2 replies; 6+ messages in thread
From: Steven A. Falco @ 2007-10-26 17:54 UTC (permalink / raw)
To: rpm; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 779 bytes --]
Hmmm. IRQ4 is "PCI ExternalCommand Write"? But I'm not using PCI.
Here is the output:
# ./irqloop
NULL ->unmask handler, IRQ 4, chip <NULL>
Test mode: user-space task
Port type: serial
Port address: 0x3f8
Port IRQ: 4
Received IRQs: 0
Acknowledged IRQs: 0
Xenomai: POSIX: destroyed thread c0f80320
Philippe Gerum wrote:
> Steven A. Falco wrote:
>
>> I am testing kernel 2.6.23 ARCH=powerpc with Xenomai 2.4-rc4. The
>> clocktest and cyclictest work perfectly with the uic/spinlock patches.
>> However, the irqloop test fails with the Oops shown below.
>>
>>
>
> Please try the patch below. It looks like the chip descriptor does not implement
> any unmask handler, which seems odd. This patch should tell us a bit more about
> this issue.
>
>
[-- Attachment #2: Type: text/html, Size: 1318 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] clocktest and cyclictest work but irqloop crashes
2007-10-26 17:54 ` Steven A. Falco
@ 2007-10-26 18:03 ` Jan Kiszka
2007-10-26 19:06 ` Steven A. Falco
2007-10-26 21:13 ` Philippe Gerum
1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2007-10-26 18:03 UTC (permalink / raw)
To: Steven A. Falco; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
Steven A. Falco wrote:
> Hmmm. IRQ4 is "PCI ExternalCommand Write"? But I'm not using PCI.
> Here is the output:
>
> # ./irqloop
> NULL ->unmask handler, IRQ 4, chip <NULL>
> Test mode: user-space task
> Port type: serial
> Port address: 0x3f8
> Port IRQ: 4
Well, irqloop is preconfigured for boring x86 PCs, not thrilling PowerPC
platforms :). It assumes there is a 16550-based UART at the given
address using the given IRQ, but I would bet this doesn't apply to your
board. Please check doc/txt/irqbench.txt on the requirements.
What interface do you plan to use for the IRQ latency test? Maybe it is
possible to extend the benchmark driver.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] clocktest and cyclictest work but irqloop crashes
2007-10-26 18:03 ` Jan Kiszka
@ 2007-10-26 19:06 ` Steven A. Falco
0 siblings, 0 replies; 6+ messages in thread
From: Steven A. Falco @ 2007-10-26 19:06 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 3514 bytes --]
My apologies - I didn't realize I had to change that configuration.
I'll look into it.
The 405GP UART is a 16550 clone but the registers are at ef600300 in
memory space, and the IRQ is 0. This information is captured in the
board-specific .dts file - it looks like the .dts info is made available
in /sysfs.
That said, I think there is more going on here. Without Xenomai, I am
able to ping the loopback address. With Xenomai, I get a crash, also
involving a "kernel access of bad area". Note: in both cases I am able
to mount my root filesystem over NFS, so the kernel is able to use the
network, but user-land (or at least ping) is not. Here is what the ping
crash looks like:
# ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
Unable to handle kernel paging request for data at address 0x00000008
Faulting instruction address: 0xc01b4968
Oops: Kernel access of bad area, sig: 11 [#1]
Netdec
Modules linked in:
NIP: c01b4968 LR: c01b4fc8 CTR: c0172e88
REGS: c0e479e0 TRAP: 0300 Not tainted (2.6.23)
MSR: 00029030 <EE,ME,IR,DR> CR: 42000422 XER: 00000000
DEAR: 00000008, ESR: 00000000
TASK = c06cb420[660] 'ping' THREAD: c0e46000
GPR00: 00000000 c0e47a90 c06cb420 00000008 00000001 7f000001 7f000001
00000002
GPR08: c0f21e00 c02a1680 00000000 c02a0000 c0f21e10 100d25f0 00ff9900
00000001
GPR16: 000000a0 c06dbf68 c0230000 c0290000 c0e47b78 fffee72a c02e7d88
00000000
GPR24: c02e7da8 00000040 c02a1680 c02e9208 00000001 c06c0040 c034fbe0
c0f21e10
NIP [c01b4968] __raw_v4_lookup+0x10/0x84
LR [c01b4fc8] raw_v4_input+0xb0/0x15c
Call Trace:
[c0e47a90] [c01b4f94] raw_v4_input+0x7c/0x15c (unreliable)
[c0e47ab0] [c01949b0] ip_local_deliver+0xb0/0x188
[c0e47ad0] [c0194cc4] ip_rcv+0x23c/0x4a4
[c0e47b00] [c017b774] netif_receive_skb+0x220/0x2dc
[c0e47b30] [c017deb4] process_backlog+0xb0/0x190
[c0e47b70] [c017e03c] net_rx_action+0xa8/0x19c
[c0e47bb0] [c0023294] __do_softirq+0x80/0xfc
[c0e47be0] [c0004e8c] do_softirq+0x74/0x78
[c0e47bf0] [c0023050] local_bh_enable+0x70/0x98
[c0e47c00] [c017e768] dev_queue_xmit+0x9c/0x2c8
[c0e47c20] [c0184e68] neigh_resolve_output+0xe4/0x258
[c0e47c50] [c0199310] ip_output+0x2c4/0x328
[c0e47c70] [c01987f8] ip_push_pending_frames+0x280/0x40c
[c0e47c90] [c01b5928] raw_sendmsg+0x684/0x71c
[c0e47d10] [c01be83c] inet_sendmsg+0x50/0x78
[c0e47d30] [c016f3cc] sock_sendmsg+0xac/0xf4
[c0e47e20] [c016f75c] sys_sendto+0xcc/0x108
[c0e47f00] [c01700c4] sys_socketcall+0x138/0x1d8
[c0e47f40] [c000d98c] ret_from_syscall+0x0/0x3c
Instruction dump:
7d2b0194 913f0000 915f0004 80010014 83e1000c 7c0803a6 38210010 4e800020
2c030000 4da20020 34630008 41820070 <81230000> 2f090000 419a0008 7c004a2c
Kernel panic - not syncing: Fatal exception in interrupt
Rebooting in 1 seconds..<0>System Halted, OK to turn off power
Steve
Jan Kiszka wrote:
> Steven A. Falco wrote:
>
>> Hmmm. IRQ4 is "PCI ExternalCommand Write"? But I'm not using PCI.
>> Here is the output:
>>
>> # ./irqloop
>> NULL ->unmask handler, IRQ 4, chip <NULL>
>> Test mode: user-space task
>> Port type: serial
>> Port address: 0x3f8
>> Port IRQ: 4
>>
>
> Well, irqloop is preconfigured for boring x86 PCs, not thrilling PowerPC
> platforms :). It assumes there is a 16550-based UART at the given
> address using the given IRQ, but I would bet this doesn't apply to your
> board. Please check doc/txt/irqbench.txt on the requirements.
>
> What interface do you plan to use for the IRQ latency test? Maybe it is
> possible to extend the benchmark driver.
>
> Jan
>
>
[-- Attachment #2: Type: text/html, Size: 4173 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] clocktest and cyclictest work but irqloop crashes
2007-10-26 17:54 ` Steven A. Falco
2007-10-26 18:03 ` Jan Kiszka
@ 2007-10-26 21:13 ` Philippe Gerum
1 sibling, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2007-10-26 21:13 UTC (permalink / raw)
To: Steven A. Falco; +Cc: xenomai
Steven A. Falco wrote:
> Hmmm. IRQ4 is "PCI ExternalCommand Write"? But I'm not using PCI.
> Here is the output:
>
> # ./irqloop
> NULL ->unmask handler, IRQ 4, chip <NULL>
Mgmfff... Ok, regardless of whether the IRQ number is valid or not, it
would be great that Xenomai avoids jumping out of the window like this
when no IC chip descriptor is associated. Will fix, thanks.
> Test mode: user-space task
> Port type: serial
> Port address: 0x3f8
> Port IRQ: 4
>
> Received IRQs: 0
> Acknowledged IRQs: 0
> Xenomai: POSIX: destroyed thread c0f80320
>
>
> Philippe Gerum wrote:
>> Steven A. Falco wrote:
>>
>>> I am testing kernel 2.6.23 ARCH=powerpc with Xenomai 2.4-rc4. The
>>> clocktest and cyclictest work perfectly with the uic/spinlock patches.
>>> However, the irqloop test fails with the Oops shown below.
>>>
>>>
>>
>> Please try the patch below. It looks like the chip descriptor does not implement
>> any unmask handler, which seems odd. This patch should tell us a bit more about
>> this issue.
>>
>>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-26 21:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 15:05 [Xenomai-core] clocktest and cyclictest work but irqloop crashes Steven A. Falco
2007-10-26 17:15 ` Philippe Gerum
2007-10-26 17:54 ` Steven A. Falco
2007-10-26 18:03 ` Jan Kiszka
2007-10-26 19:06 ` Steven A. Falco
2007-10-26 21:13 ` 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.