This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAPL138] Why is RingIO_sendNotify blocking?

I'm using RingIO for transmitting large amounts of data between ARM and DSP. Everything goes well, except from one thing. RingIO_sendNotify called from Linux to DSP tends to block once a few calls. Under what circumstances does RingIO_sendNotify block? Sending notifications from DSP to Linux seems to work just fine.

Kernel spits out:

Pid: 737, comm:               ringio
CPU: 0    Tainted: P            (2.6.31-rc7-davinci1 #87)
PC is at IPS_notify+0xcc/0x1ac [dsplinkk]
LR is at __mutex_unlock_slowpath+0x104/0x118
pc : [<bf05d50c>]    lr : [<c029a820>]    psr: 20000013
sp : c1f2fe50  ip : c1f2fe14  fp : c1f2fe8c
r10: 00000000  r9 : c2aa9180  r8 : 00000000
r7 : 01122b54  r6 : c2aa8000  r5 : 00008000  r4 : bf077610
r3 : 00000001  r2 : 02faf080  r1 : 00000000  r0 : c2abd000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: c1f18000  DAC: 00000015
[<c002bee8>] (show_regs+0x0/0x4c) from [<c006c5f0>] (softlockup_tick+0x114/0x184)
 r4:0000001f
[<c006c4dc>] (softlockup_tick+0x0/0x184) from [<c0049da0>] (run_local_timers+0x1c/0x20)
[<c0049d84>] (run_local_timers+0x0/0x20) from [<c004a09c>] (update_process_times+0x34/0x64)
[<c004a068>] (update_process_times+0x0/0x64) from [<c0062884>] (tick_sched_timer+0x94/0xcc)
 r6:00000062 r5:2f16bc7c r4:c035ffd4
[<c00627f0>] (tick_sched_timer+0x0/0xcc) from [<c005981c>] (__run_hrtimer+0x9c/0xf4)
 r7:ffffffff r6:c035fac0 r5:c035ffd4 r4:c00627f0
[<c0059780>] (__run_hrtimer+0x0/0xf4) from [<c0059be0>] (hrtimer_interrupt+0x1c0/0x260)
 r6:00000062 r5:2f16a72a r4:00000000
[<c0059a20>] (hrtimer_interrupt+0x0/0x260) from [<c0033b80>] (timer_interrupt+0x1c/0x28)
[<c0033b64>] (timer_interrupt+0x0/0x28) from [<c006cb10>] (handle_IRQ_event+0x44/0x110)
[<c006cacc>] (handle_IRQ_event+0x0/0x110) from [<c006f054>] (handle_edge_irq+0x148/0x1b0)
 r7:c035ab3c r6:00000015 r5:c0360930 r4:c1f2e000
[<c006ef0c>] (handle_edge_irq+0x0/0x1b0) from [<c002a070>] (_text+0x70/0x8c)
 r7:00000002 r6:00200000 r5:00000000 r4:00000015
[<c002a000>] (_text+0x0/0x8c) from [<c002aa60>] (__irq_svc+0x40/0x90)
Exception stack(0xc1f2fe08 to 0xc1f2fe50)
fe00:                   c2abd000 00000000 02faf080 00000001 bf077610 00008000
fe20: c2aa8000 01122b54 00000000 c2aa9180 00000000 c1f2fe8c c1f2fe14 c1f2fe50
fe40: c029a820 bf05d50c 20000013 ffffffff                                    
 r5:febfd000 r4:ffffffff
[<bf05d440>] (IPS_notify+0x0/0x1ac [dsplinkk]) from [<bf06aa5c>] (NOTIFY_KnlNotify+0x30/0x44 [dsplinkk])
[<bf06aa2c>] (NOTIFY_KnlNotify+0x0/0x44 [dsplinkk]) from [<bf06d7f0>] (DRV_Ioctl+0x7d0/0x974 [dsplinkk])
[<bf06d020>] (DRV_Ioctl+0x0/0x974 [dsplinkk]) from [<c00a65c4>] (vfs_ioctl+0x78/0x94)
 r7:00000003 r6:be81356c r5:00007305 r4:c1ea5b80
[<c00a654c>] (vfs_ioctl+0x0/0x94) from [<c00a721c>] (do_vfs_ioctl+0x578/0x5d0)
 r6:be81356c r5:c182e0f4 r4:c1ea5b80
[<c00a6ca4>] (do_vfs_ioctl+0x0/0x5d0) from [<c00a72b4>] (sys_ioctl+0x40/0x60)
 r8:c002b004 r7:00000036 r6:00007305 r5:fffffff7 r4:c1ea5b80
[<c00a7274>] (sys_ioctl+0x0/0x60) from [<c002ae60>] (ret_fast_syscall+0x0/0x2c)
 r6:00008c2c r5:00008c20 r4:be815ec4
BUG: soft lockup - CPU#0 stuck for 61s! [ringio:737]
Modules linked in: texas(P) dsplinkk g_serial kmod_pbx dspdet(P)

Pid: 737, comm:               ringio
CPU: 0    Tainted: P            (2.6.31-rc7-davinci1 #87)
PC is at __mutex_lock_interruptible_slowpath+0x288/0x2e4
LR is at __mutex_lock_interruptible_slowpath+0x26c/0x2e4
pc : [<c029ae90>]    lr : [<c029ae74>]    psr: 60000013
sp : c1f2fdf8  ip : c1f2fdf8  fp : c1f2fe28
r10: 00000000  r9 : c2aa9180  r8 : c1eb6fa0
r7 : 0242df2e  r6 : c2abd000  r5 : 60000013  r4 : c1f2e000
r3 : 00000000  r2 : c2abd004  r1 : 00000000  r0 : c2abd000
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: c1f18000  DAC: 00000015
[<c002bee8>] (show_regs+0x0/0x4c) from [<c006c5f0>] (softlockup_tick+0x114/0x184)
 r4:0000005c
[<c006c4dc>] (softlockup_tick+0x0/0x184) from [<c0049da0>] (run_local_timers+0x1c/0x20)
[<c0049d84>] (run_local_timers+0x0/0x20) from [<c004a09c>] (update_process_times+0x34/0x64)
[<c004a068>] (update_process_times+0x0/0x64) from [<c0062884>] (tick_sched_timer+0x94/0xcc)
 r6:000000a4 r5:114952c4 r4:c035ffd4
[<c00627f0>] (tick_sched_timer+0x0/0xcc) from [<c005981c>] (__run_hrtimer+0x9c/0xf4)
 r7:ffffffff r6:c035fac0 r5:c035ffd4 r4:c00627f0
[<c0059780>] (__run_hrtimer+0x0/0xf4) from [<c0059be0>] (hrtimer_interrupt+0x1c0/0x260)
 r6:000000a4 r5:11493fe2 r4:c035aad0
[<c0059a20>] (hrtimer_interrupt+0x0/0x260) from [<c0033b80>] (timer_interrupt+0x1c/0x28)
[<c0033b64>] (timer_interrupt+0x0/0x28) from [<c006cb10>] (handle_IRQ_event+0x44/0x110)
[<c006cacc>] (handle_IRQ_event+0x0/0x110) from [<c006f054>] (handle_edge_irq+0x148/0x1b0)
 r7:c035ab3c r6:00000015 r5:c0360930 r4:c1f2e000
[<c006ef0c>] (handle_edge_irq+0x0/0x1b0) from [<c002a070>] (_text+0x70/0x8c)
 r7:00000003 r6:00200000 r5:00000000 r4:00000015
[<c002a000>] (_text+0x0/0x8c) from [<c002aa60>] (__irq_svc+0x40/0x90)
Exception stack(0xc1f2fdb0 to 0xc1f2fdf8)
fda0:                                     c2abd000 00000000 c2abd004 00000000
fdc0: c1f2e000 60000013 c2abd000 0242df2e c1eb6fa0 c2aa9180 00000000 c1f2fe28
fde0: c1f2fdf8 c1f2fdf8 c029ae74 c029ae90 60000013 ffffffff                  
 r5:febfd000 r4:ffffffff
[<c029ac08>] (__mutex_lock_interruptible_slowpath+0x0/0x2e4) from [<c029af00>] (mutex_lock_interruptible+0x14/0x28)
 r8:00000000 r7:0242df2e r6:c2aa8000 r5:00008000 r4:c2abd000
[<c029aeec>] (mutex_lock_interruptible+0x0/0x28) from [<bf069a7c>] (SYNC_SpinLockStartEx+0x18/0x24 [dsplinkk])
 r4:bf077610
[<bf069a64>] (SYNC_SpinLockStartEx+0x0/0x24 [dsplinkk]) from [<bf05d534>] (IPS_notify+0xf4/0x1ac [dsplinkk])
[<bf05d440>] (IPS_notify+0x0/0x1ac [dsplinkk]) from [<bf06aa5c>] (NOTIFY_KnlNotify+0x30/0x44 [dsplinkk])
[<bf06aa2c>] (NOTIFY_KnlNotify+0x0/0x44 [dsplinkk]) from [<bf06d7f0>] (DRV_Ioctl+0x7d0/0x974 [dsplinkk])
[<bf06d020>] (DRV_Ioctl+0x0/0x974 [dsplinkk]) from [<c00a65c4>] (vfs_ioctl+0x78/0x94)
 r7:00000003 r6:be81356c r5:00007305 r4:c1ea5b80
[<c00a654c>] (vfs_ioctl+0x0/0x94) from [<c00a721c>] (do_vfs_ioctl+0x578/0x5d0)
 r6:be81356c r5:c182e0f4 r4:c1ea5b80
[<c00a6ca4>] (do_vfs_ioctl+0x0/0x5d0) from [<c00a72b4>] (sys_ioctl+0x40/0x60)
 r8:c002b004 r7:00000036 r6:00007305 r5:fffffff7 r4:c1ea5b80
[<c00a7274>] (sys_ioctl+0x0/0x60) from [<c002ae60>] (ret_fast_syscall+0x0/0x2c)
 r6:00008c2c r5:00008c20 r4:be815ec4

  • Hello,

    This log is indicating a soft lockup for 61 sec.

    RingIO_sendNotify sends a payload to the DSP. The functionality is such that the logic waits till the DSP has actually retrieved the payload. The reason you are seeing a lockup is because DSP is too busy to run the DSPLink ISR registered which will retrieve the payload.

    It would be interesting to see what the DSP is doing at this time. That holds the key to why you are seeing this behavior. If you setup CCS, it would give you a clue to what the DSP is doing which is blocking DSPLink ISR to run.

    Deepali