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.

Questions about enabling the DSPLink threads to work in a RT environment

Other Parts Discussed in Thread: OMAPL138

Hi,

In our project (using OMAPL138), we have two RingIO channels between ARM and DSP, each of them has a different direction. On ARM-side, we have a few of threads with RT priorities. Sometimes, for the RingIO channel from ARM to DSP, on ARM-side, calling RingIO_release() took longer time (around 7ms). Do you have any ideas about this?

Then we doubt that it maybe due to the real time environment. We follow the instruction on DSPLINK FAQs link: http://processors.wiki.ti.com/index.php/DSPLink_FAQs#Does_DSPLink_work_in_an_Real_Time_environment.3F_When_I_use_it_I_see_high_latency.3F

to enable the DSPLINK threads to work in the RT environment. I put the following codes there:

 struct sched_param SchedParam;
 SchedParam.sched_priority = 90;
 sched_setscheduler (0, SCHED_FIFO, &SchedParam); 

Then rebuild dsplinkk.ko. However, after installed this module and ran our applications, we got the kernel crash with the following log information:

Internal error: Oops: 17 [#2] PREEMPT
last sysfs file:
Modules linked in: dsplinkk CPU: 0    Tainted: G      D     (2.6.34-rc1 #1)
PC is at cap_safe_nice+0x18/0x70
LR is at cap_safe_nice+0xc/0x70
pc : [<c0148508>]    lr : [<c01484fc>]    psr: 20000013
sp : c567bf58  ip : 00000000  fp : c567bf9c
r10: c567bfa4  r9 : 00000000  r8 : ffffffff
r7 : c567a000  r6 : 00000001  r5 : 00000000  r4 : 00000000
r3 : c5c80680  r2 : c5c80680  r1 : 00000001  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: c5594000  DAC: 00000017
Process DSPLINK_DPC_1 (pid: 951, stack limit = 0xc567a270)
Stack: (0xc567bf58 to 0xc567c000)
bf40:                                                       00000001 c003ae08
bf60: c03e7430 00000001 c567bf94 c567bf78 c0036928 c567bfd4 c567a000 00000001
bf80: bf036bf0 00000000 00000001 00000000 00000000 c567bfa0 bf036c1c c003ac74
bfa0: 00000000 0000005a c55f9cf4 c567bfd4 c55f9cf4 00000001 bf036bf0 00000000
bfc0: 00000000 00000000 00000000 c00534cc 00000000 00000000 c567bfd8 c567bfd8
bfe0: 00000000 00000000 00000000 00000000 00000000 c0029960 ffdffeee feda0e2f
[<c0148508>] (cap_safe_nice+0x18/0x70) from [<c003ae08>] (__sched_setscheduler+0x1a4/0x4c4)
[<c003ae08>] (__sched_setscheduler+0x1a4/0x4c4) from [<bf036c1c>] (DPC_Callback+0x2c/0xe4 [dsplinkk])
[<bf036c1c>] (DPC_Callback+0x2c/0xe4 [dsplinkk]) from [<c00534cc>] (kthread+0x78/0x80)
[<c00534cc>] (kthread+0x78/0x80) from [<c0029960>] (kernel_thread_exit+0x0/0x8)
Code: ebfc9579 e3cd3d7f e3c3303f e593300c (e59401e8)

Thanks in advance!