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.

TDA4VM: J721e runtime kernel panic

Part Number: TDA4VM

TI工程师你好:

     我们目前有个项目在TDA4上使用ti-processor-sdk-linux-j7-evm-07_02_00_07版本进行A72的开发,使用CPSW驱动,应用程序使用TCP方式给PC发送视频流,一段时间后内核panic,在E2E上有看到相同的问题,TI工程师回复有patch可以修复,但并未在链接中共享此patch,请问我在哪里可以下到这个patch。

E2E相同问题的网址:https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1077000/tda4vm-j721e-runtime-kernel-panic

内核panic的日志:

2023-03-17 00:06:46] [ 1640.624721] ------------[ cut here ]------------
[2023-03-17 00:06:49] [ 1640.629360] kernel BUG at lib/genalloc.c:506!
[2023-03-17 00:06:49] [ 1640.633702] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[2023-03-17 00:06:49] [ 1640.639169] Modules linked in: xt_conntrack xt_MASQUERADE xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_tables x_tables br_netfilter bridge stp llc can_raw can xfrm_user xfrm_algo xhci_plat_hcd xhci_hcd usbcore rpmsg_char omap_rng rng_core cdns3 roles udc_core usb_common crct10dif_ce ti_j721e_cpsw_virt_mac ti_k3_r5_remoteproc sa2ul sha512_generic authenc ti_k3_dsp_remoteproc virtio_rpmsg_bus cdns3_ti rti_wdt m_can_platform m_can can_dev sch_fq_codel rpmsg_kdrv_switch ipv6
[2023-03-17 00:06:49] [ 1640.685752] CPU: 0 PID: 1318 Comm: easydarwin Not tainted 5.4.74-gdc1260ed9b13 #1
[2023-03-17 00:06:49] [ 1640.693212] Hardware name: Texas Instruments K3 J721E SoC (DT)
[2023-03-17 00:06:49] [ 1640.699028] pstate: 00000005 (nzcv daif -PAN -UAO)
[2023-03-17 00:06:49] [ 1640.703809] pc : gen_pool_free_owner+0xf0/0x100
[2023-03-17 00:06:49] [ 1640.708323] lr : gen_pool_free_owner+0xa4/0x100
[2023-03-17 00:06:49] [ 1640.712835] sp : ffff80001000fd40
[2023-03-17 00:06:49] [ 1640.716134] x29: ffff80001000fd40 x28: ffff000852f89000
[2023-03-17 00:06:49] [ 1640.721430] x27: ffff00084cd9e8b0 x26: ffff0008407af410
[2023-03-17 00:06:49] [ 1640.726724] x25: ffff00084cd9e8a8 x24: 0000000000000007
[2023-03-17 00:06:49] [ 1640.732018] x23: ffff00007c0800ff x22: 0000000000000000
[2023-03-17 00:06:49] [ 1640.737313] x21: 0000000000000001 x20: ffff000854ee9300
[2023-03-17 00:06:49] [ 1640.742607] x19: ffff00007c080080 x18: 0000000000000000
[2023-03-17 00:06:49] [ 1640.747901] x17: 0000000000000000 x16: 0000000000000000
[2023-03-17 00:06:49] [ 1640.753194] x15: 0000000000000000 x14: 0000000000000000
[2023-03-17 00:06:49] [ 1640.758488] x13: ffff800012400000 x12: 0000000000000001
[2023-03-17 00:06:49] [ 1640.763782] x11: 0000000000000000 x10: 0000000000000001
[2023-03-17 00:06:49] [ 1640.769075] x9 : 0000000000000001 x8 : ffff800012400038
[2023-03-17 00:06:50] [ 1640.774369] x7 : 0000000000000001 x6 : 0000000000000000
[2023-03-17 00:06:50] [ 1640.779663] x5 : fffffffffffffffd x4 : 0000000000000002
[2023-03-17 00:06:50] [ 1640.784957] x3 : ffff800012400038 x2 : 0000000000000003
[2023-03-17 00:06:50] [ 1640.790251] x1 : 000000000000003c x0 : 0000000000000001
[2023-03-17 00:06:50] [ 1640.795545] Call trace:
[2023-03-17 00:06:50] [ 1640.797980] gen_pool_free_owner+0xf0/0x100
[2023-03-17 00:06:50] [ 1640.802154] k3_cppi_desc_pool_free+0x18/0x20 [ti_j721e_cpsw_virt_mac]
[2023-03-17 00:06:50] [ 1640.808662] virt_cpsw_nuss_xmit_free.isra.0+0x60/0xf8 [ti_j721e_cpsw_virt_mac]
[2023-03-17 00:06:50] [ 1640.815951] virt_cpsw_nuss_tx_poll+0xa4/0x280 [ti_j721e_cpsw_virt_mac]
[2023-03-17 00:06:50] [ 1640.822547] net_rx_action+0x114/0x340
[2023-03-17 00:06:50] [ 1640.826282] __do_softirq+0x120/0x25c
[2023-03-17 00:06:50] [ 1640.829930] irq_exit+0xb8/0xd8
[2023-03-17 00:06:50] [ 1640.833061] __handle_domain_irq+0x64/0xb8
[2023-03-17 00:06:50] [ 1640.837140] gic_handle_irq+0x5c/0x148
[2023-03-17 00:06:50] [ 1640.840873] el0_irq_naked+0x4c/0x54
[2023-03-17 00:06:50] [ 1640.844437] Code: d65f03c0 14000044 17fffff6 d4210000 (d4210000)
[2023-03-17 00:06:50] [ 1640.850516] ---[ end trace 5900653af9275675 ]---
[2023-03-17 00:06:50] [ 1640.855117] Kernel panic - not syncing: Fatal exception in interrupt
[2023-03-17 00:06:50] [ 1640.861450] SMP: stopping secondary CPUs
[2023-03-17 00:06:50] [ 1640.865361] Kernel Offset: disabled
[2023-03-17 00:06:50] [ 1640.868835] CPU features: 0x0002,20006008
[2023-03-17 00:06:50] [ 1640.872828] Memory Limit: none
[2023-03-17 00:06:50] [ 1640.875872] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

  • 您好我们已收到您的问题并升级到英文论坛寻求帮助,链接如下,如有答复将尽快回复您:

    e2e.ti.com/.../tda4vm-721e-runtime-kernel-panic

  • 您好,

    patch如下:

    diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
    index a5bf90646337..296671b4e0c4 100644
    --- a/drivers/soc/ti/k3-ringacc.c
    +++ b/drivers/soc/ti/k3-ringacc.c
    @@ -1170,11 +1170,13 @@ static int k3_ringacc_ring_push_mem(struct k3_ring *ring, void *elem)
     
     static int k3_ringacc_ring_pop_mem(struct k3_ring *ring, void *elem)
     {
    -	void *elem_ptr;
    +	volatile dma_addr_t *elem_ptr;
     
     	elem_ptr = k3_ringacc_get_elm_addr(ring, ring->state.rindex);
     
    -	memcpy(elem, elem_ptr, (4 << ring->elm_size));
    +	while (*elem_ptr == 0);
    +	memcpy_fromio(elem, elem_ptr, (4 << ring->elm_size));
    +	memset_io(elem_ptr, 0, (4 << ring->elm_size));
     
     	ring->state.rindex = (ring->state.rindex + 1) % ring->size;
     	ring->state.occ--;

  • Hi Cherry:

          我集成验证一下,有结果后会及时同步给你,多谢