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.

[66AK2H12] DSP SRIO example conflicts with ARM Linux kernel hwqueue driver

Other Parts Discussed in Thread: 66AK2H12

I have the 66AK2H12 ARM CPU's running Linux and have loaded the SRIO example program on 66AK2H12 and C6678 DSP cores, respectively. 66AK2H12 and C6678 are properly connected over their SRIO interfaces. SRIO_TputBenchmarkingK2KC66TestProject.out runs on core 0 of 66AK2H12 and SRIO_TputBenchmarkingTestProject.out runs on core 1 of C6678. However, when the 66AK2H12 DSP SRIO program runs the QMSS related codes, the ARM CPU hangs up with a CPU exception. Below please find the exception dump from Linux kernel. It seems DSP SRIO program conflicting with ARM Linux kernel drivers. Have you find the solution to the conflict between DSP and ARM, when they have to go with each other?


Hardware: a board with one 66AK2H12 and one Quad-Shannon (C6678).
Software: SRIO example SRIO_TputBenchmarkingK2KC66TestProject and SRIO_TputBenchmarkingTestProject

PS. adv761x module driver, which runs on 66AK2H12 ARM Linux to configure ADV761x.

[ 9033.287256] ------------[ cut here ]------------
[ 9033.291900] WARNING: at drivers/hwqueue/keystone_hwqueue.c:357 khwq_unmap+0xd0/0x104()
[ 9033.299852] Modules linked in: adv761x(O)
[ 9033.303886] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G           O 3.10.10-00004-g10f98f3-dirty #1
[ 9033.312722] [<c0014f64>] (unwind_backtrace+0x0/0xf8) from [<c00117ac>] (show_stack+0x10/0x14)
[ 9033.321290] [<c00117ac>] (show_stack+0x10/0x14) from [<c0020ce0>] (warn_slowpath_common+0x4c/0x6c)
[ 9033.330292] [<c0020ce0>] (warn_slowpath_common+0x4c/0x6c) from [<c0020d1c>] (warn_slowpath_null+0x1c/0x24)
[ 9033.339991] [<c0020d1c>] (warn_slowpath_null+0x1c/0x24) from [<c03902a0>] (khwq_unmap+0xd0/0x104)
[ 9033.348906] [<c03902a0>] (khwq_unmap+0xd0/0x104) from [<c02908c8>] (chan_complete+0xec/0x69c)
[ 9033.357471] [<c02908c8>] (chan_complete+0xec/0x69c) from [<c02914d4>] (chan_control+0x228/0xb64)
[ 9033.366298] [<c02914d4>] (chan_control+0x228/0xb64) from [<c0318c14>] (netcp_poll+0x40/0xc4)
[ 9033.374773] [<c0318c14>] (netcp_poll+0x40/0xc4) from [<c03b452c>] (net_rx_action+0xa0/0x1a8)
[ 9033.383251] [<c03b452c>] (net_rx_action+0xa0/0x1a8) from [<c0027f78>] (__do_softirq+0xe8/0x258)
[ 9033.391987] [<c0027f78>] (__do_softirq+0xe8/0x258) from [<c00283c0>] (irq_exit+0x58/0x90)
[ 9033.400203] [<c00283c0>] (irq_exit+0x58/0x90) from [<c000e978>] (handle_IRQ+0x3c/0x94)
[ 9033.408157] [<c000e978>] (handle_IRQ+0x3c/0x94) from [<c0008520>] (gic_handle_irq+0x28/0x5c)
[ 9033.416638] [<c0008520>] (gic_handle_irq+0x28/0x5c) from [<c04d4a00>] (__irq_svc+0x40/0x50)
[ 9033.425017] Exception stack(0xee0f3f90 to 0xee0f3fd8)
[ 9033.430089] 3f80:                                     c13bc918 00000000 003b4872 00000000
[ 9033.438301] 3fa0: ee0f2000 c075ad70 c075a5bf c0722454 c075a5bf c04dc390 ee0f2000 ee0f2000
[ 9033.446512] 3fc0: 00000000 ee0f3fd8 c000eae8 c000eaec 600b0013 ffffffff
[ 9033.453156] [<c04d4a00>] (__irq_svc+0x40/0x50) from [<c000eaec>] (arch_cpu_idle+0x28/0x30)
[ 9033.461462] [<c000eaec>] (arch_cpu_idle+0x28/0x30) from [<c0054c50>] (cpu_startup_entry+0x58/0x1dc)
[ 9033.470550] [<c0054c50>] (cpu_startup_entry+0x58/0x1dc) from [<806fb1c4>] (0x806fb1c4)
[ 9033.478498] ---[ end trace 0736e2e05877fd0e ]---

  • Hi,
    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Please provide below information to support you better.

    1. What is the MCSDK version used for K2H? We recommend you to use the latest MCSDK 3.1 released for K2H.

    2. I hope you have K2H EVM? If Yes, Please provide revision number?

    3. How the out file is loaded to DSP of K2H ? Using MPM or Debugger?

    4. As for i know, Quad Shannan has only PCIe interface for external communication. Could you please share the image/connection diagram of your  setup? 

    Thank you.

  • Hi, Rajasekaran

    1, I use MCSDK Linux 3.00.03.15. I'll try the latest MCSDK 3.1 to see if the conflict between DSP and ARM has been solved.

    2. Yes I have. However, the board I used to run the SRIO program is Advantech DSPC8683.

    3. Using debugger to load out file to DSP of K2H and C6678.

    4. Below is part of block diagram of DSPC8683

    Thank you,

    Celesti

     

  • Hi Celesti,

    I am not able to view your setup block diagram. Please share your block diagram via attachment.

    Thanks,

  • Hi Ganapathi,

    Please find the attachment.

    Thanks,

    Celesti

     

  • Hi Celesti,

    Have you using MCSDK(2.0 and 3.0) example projects for your testing? For my understanding MCSDK(2.0 and 3.0) example projects are not directly support on DSPC-8683 board.

    I think TI not provide software package for DSPC-8683 board. Please check with advantech and get DSPC-8683 board software package.

    Thanks,

  • Dear Ganapathi,

    You probably missed my point. My questions is why ARM CPU hangs up with a CPU exception when the 66AK2H12 DSP SRIO program is running the QMSS initialization. Thus I wonder if DSP SRIO program conflicting with ARM Linux kernel driver which is probably using QMSS too.

    If the boot mode is switched to no-boot mode, that means, the kernel will not boot up, I use DSP of 66AK2H12 as consumer DSP and use C6678 as producer DSP, trying to preform SRIO throughput test between both, and the SRIO programs run perfectly.

    Thanks,

    Celesti

  • Hi Celesti,

    I am not expert on ARM linux kernel. I will check with my team and get back to you.

    Thanks,


  • Hi,

    I have checked the linux dts file for hwqueue usage. The linux uses queue between 128-255 & 658-665 and its interrupts. Please find the queues description in device tree. 

    PATH: arch/arm/boot/dts/keystone.dtsi

     queues {
                                    qpend-arm-low {
                                            values = <658 8>;
                                            interrupts = <0 40 0xf04>,
                                                    <0 41 0xf04>,
                                                    <0 42 0xf04>,
                                                    <0 43 0xf04>,
                                                    <0 44 0xf04>,
                                                    <0 45 0xf04>,
                                                    <0 46 0xf04>,
                                                    <0 47 0xf04>;
                                            reserved;
                                    };
                                    general {
                                            values = <4000 64>;
                                    };
                                    accumulator-low-0 {
                                            values = <128 32>;
                                            /* pdsp-id, channel, entries,
                                                pacing mode, latency */
                                            accumulator = <0 36 16 2 50>;
                                            interrupts = <0 215 0xf01>;
                                            multi-queue;
                                            reserved;
                                    };
                                    accumulator-low-1 {
                                            values = <160 32>;
                                            /* pdsp-id, channel, entries,
                                                pacing mode, latency */
                                            accumulator = <0 37 16 2 50>;
                                            interrupts = <0 216 0xf01>;
                                            multi-queue;
                                    };
                                    accumulator-low-2 {
                                            values = <192 32>;
                                            /* pdsp-id, channel, entries,
                                                pacing mode, latency */
                                            accumulator = <0 38 16 2 50>;
                                            interrupts = <0 217 0xf01>;
                                            multi-queue;
                                    };
                                    accumulator-low-3 {
                                            values = <224 32>;
                                            /* pdsp-id, channel, entries,
                                                pacing mode, latency */
                                            accumulator = <0 39 16 2 50>;
                                            interrupts = <0 218 0xf01>;
                                            multi-queue;
                                    };
                            };
    

    Thank you.