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.

[FAQ] AM64x, AM65x RT Linux SDK 8.6: PRU Ethernet link down causes kernel crash

Part Number: PROCESSOR-SDK-AM64X

Problem 

I am using RT Linux SDK 8.6 with either AM64x, or AM65x. When I do a link down with PRU Ethernet, there is a kernel crash.

Sample terminal output 

#1

root@AM64x-CustomerBoard:~# ifconfig eth2 down
[ 28.736701] remoteproc remoteproc7: stopped remote processor 3000a000.txpru
root@AM64x-CustomerBoard:~# [ 28.736739] remoteproc remoteproc6: stopped remote processor 30004000.rtu
[ 28.736749] remoteproc remoteproc5: stopped remote processor 30034000.pru
[ 28.745812] net eth2: stopped

root@AM64x-CustomerBoard:~# ifconfig eth2[ 32.109270] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
[ 32.118066] Mem abort info:
[ 32.120849] ESR = 0x96000006
[ 32.123892] EC = 0x25: DABT (current EL), IL = 32 bits
[ 32.129191] SET = 0, FnV = 0
[ 32.132233] EA = 0, S1PTW = 0
[ 32.135364] Data abort info:
[ 32.138231] ISV = 0, ISS = 0x00000006
[ 32.142055] CM = 0, WnR = 0
[ 32.145011] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000839f4000
[ 32.151436] [0000000000000018] pgd=00000000834c6003, p4d=00000000834c6003, pud=00000000834ca003, pmd=0000000000000000
[ 32.162036] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[ 32.167597] Modules linked in: wlcore_sdio wl18xx wlcore mac80211 libarc4 cfg80211 rfkill xhci_plat_hcd xhci_hcd cdns3 roles usbcore udc_core rpmsg_char usb_common irq_pruss_intc ti_am335x_adc kfifo_buf crct10dif_ce icssg_prueth pru_rproc icss_iep pci_endpoint_test cdns3_ti ti_k3_r5_remoteproc virtio_rpmsg_bus rti_wdt ti_k3_m4_remoteproc sa2ul sha512_generic authenc pruss ti_am335x_tscadc m_can_platform m_can can_dev at24 rtc_ds1307 optee_rng rng_core sch_fq_codel ipv6
[ 32.209156] CPU: 0 PID: 755 Comm: irqbalance Not tainted 5.10.168-rt83-g45f74029a103 #1
[ 32.217146] Hardware name: TL64x-EVM (DT)
[ 32.221144] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--)
[ 32.227141] pc : ti_sci_inta_set_affinity+0x88/0xf8
[ 32.232021] lr : ti_sci_inta_set_affinity+0x88/0xf8
[ 32.236889] sp : ffff80001260bbe0
[ 32.240192] x29: ffff80001260bbe0 x28: ffff0000042f1d00
[ 32.245495] x27: 0000000000000000 x26: 0000000000000000
[ 32.250796] x25: 0000000000000000 x24: ffff8000111574c8
[ 32.256097] x23: ffff00000162c200 x22: 0000000000000000
[ 32.261398] x21: ffff0000015f1780 x20: ffff000004780c00
[ 32.266699] x19: ffff8000111fdeb0 x18: 0000000000000000
[ 32.272000] x17: 0000000000000000 x16: 0000000000000000
[ 32.277301] x15: 000000002726c1d0 x14: 0000000000000000
[ 32.282602] x13: 0000000000000000 x12: 0000000000000000
[ 32.287902] x11: 0000000000000040 x10: ffff80001113ca68
[ 32.293202] x9 : ffff80001113ca60 x8 : ffff00000069c4b8
[ 32.298503] x7 : 0000000000000000 x6 : 0000000000000000
[ 32.303804] x5 : ffff00000069c490 x4 : ffff00000069c610
[ 32.309105] x3 : 0000000000000000 x2 : 0000000000000000
[ 32.314406] x1 : 0000000000000060 x0 : 0000000000000000
[ 32.319707] Call trace:
[ 32.322144] ti_sci_inta_set_affinity+0x88/0xf8
[ 32.326665] msi_domain_set_affinity+0x40/0xb8
[ 32.331103] irq_do_set_affinity+0x174/0x220
[ 32.335367] irq_set_affinity_locked+0xc8/0x1d8
[ 32.339889] __irq_set_affinity+0x48/0x78
[ 32.343890] write_irq_affinity.isra.0+0xf8/0x118
[ 32.348583] irq_affinity_proc_write+0x24/0x30
[ 32.353017] proc_reg_write+0xa8/0x100
[ 32.356759] vfs_write+0xc0/0x370
[ 32.360070] ksys_write+0x6c/0xf8
[ 32.363377] __arm64_sys_write+0x1c/0x28
[ 32.367291] el0_svc_common.constprop.0+0x78/0x1c8
[ 32.372078] do_el0_svc+0x24/0xa0
[ 32.375398] el0_svc+0x14/0x20
[ 32.378449] el0_sync_handler+0xb0/0xb8
[ 32.382279] el0_sync+0x180/0x1c0
[ 32.385596] Code: a9410e62 a9048c02 b9432280 97ef399f (f9400c01)
[ 32.391681] ---[ end trace 9759900cf920f079 ]---
[ 32.396429] note: irqbalance[755] exited with preempt_count 2
[ 32.402383] printk: console [ttyS2]: printing thread stopped
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.109270] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.118066] Mem abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.120849] ESR = 0x96000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.123892] EC = 0x25: DABT (current EL), IL = 32 bits
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.129191] SET = 0, FnV = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.132233] EA = 0, S1PTW = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.135364] Data abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.138231] ISV = 0, ISS = 0x00000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.142055] CM = 0, WnR = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.145011] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000839f4000
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.151436] [0000000000000018] pgd=00000000834c6003, p4d=00000000834c6003, pud=00000000834ca003, pmd=0000000000000000
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.162036] Internal error: Oops: 96000006 [#1] PREEMPT SMP
2023 Mar 2 09:16:16 AM64x-CustomerBoard [ 32.385596] Code: a9410e62 a9048c02 b9432280 97ef399f (f9400c01)
2023 Mar 2 09:16:16 AM64x-CustomerBoard Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
2023 Mar 2 09:16:16 AM64x-CustomerBoard Mem abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard ESR = 0x96000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard EC = 0x25: DABT (current EL), IL = 32 bits
2023 Mar 2 09:16:16 AM64x-CustomerBoard SET = 0, FnV = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard EA = 0, S1PTW = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard Data abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard ISV = 0, ISS = 0x00000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard CM = 0, WnR = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard user pgtable: 4k pages, 48-bit VAs, pgdp=00000000839f4000
2023 Mar 2 09:16:16 AM64x-CustomerBoard Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
2023 Mar 2 09:16:16 AM64x-CustomerBoard Mem abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard ESR = 0x96000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard EC = 0x25: DABT (current EL), IL = 32 bits
2023 Mar 2 09:16:16 AM64x-CustomerBoard SET = 0, FnV = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard EA = 0, S1PTW = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard Data abort info:
2023 Mar 2 09:16:16 AM64x-CustomerBoard ISV = 0, ISS = 0x00000006
2023 Mar 2 09:16:16 AM64x-CustomerBoard CM = 0, WnR = 0
2023 Mar 2 09:16:16 AM64x-CustomerBoard user pgtable: 4k pages, 48-bit VAs, pgdp=00000000839f4000
2023 Mar 2 09:16:16 AM64x-CustomerBoard [0000000000000018] pgd=00000000834c6003, p4d=00000000834c6003, pud=00000000834ca003, pmd=0000000000000000
2023 Mar 2 09:16:16 AM64x-CustomerBoard Internal error: Oops: 96000006 [#1] PREEMPT SMP
2023 Mar 2 09:16:16 AM64x-CustomerBoard [0000000000000018] pgd=00000000834c6003, p4d=00000000834c6003, pud=00000000834ca003, pmd=0000000000000000
2023 Mar 2 09:16:16 AM64x-CustomerBoard Internal error: Oops: 96000006 [#1] PREEMPT SMP
2023 Mar 2 09:16:16 AM64x-CustomerBoard Code: a9410e62 a9048c02 b9432280 97ef399f (f9400c01)
2023 Mar 2 09:16:16 AM64x-CustomerBoard Code: a9410e62 a9048c02 b9432280 97ef399f (f9400c01)

#2

root@am65xx-evm:~# ip link set eth1 down
[ 30.885858] remoteproc remoteproc9: stopped remote processor b10a000.txpru
[ 30.885894] remoteproc remoteproc8: stopped remote processor b104000.rtu
[ 30.885906] remoteproc remoteproc7: stopped remote processor b134000.pru
[ 30.920752] net eth1: stopped
root@am65xx-evm:~# [ 34.103507] Unable to handle kernel NULL pointer dereference at virtual address 000000000000008
[ 34.112305] Mem abort info:
[ 34.115091] ESR = 0x96000006
[ 34.118136] EC = 0x25: DABT (current EL), IL = 32 bits
[ 34.123437] SET = 0, FnV = 0
[ 34.126482] EA = 0, S1PTW = 0
[ 34.129613] Data abort info:
[ 34.132484] ISV = 0, ISS = 0x00000006
[ 34.136309] CM = 0, WnR = 0
[ 34.139268] user pgtable: 4k pages, 48-bit VAs, pgdp=00000008871ca000
[ 34.145697] [0000000000000018] pgd=000000088646a003, p4d=000000088646a003, pud=0000000885e0f003, pmd=0000000000000
[ 34.156298] Internal error: Oops: 96000006 [#1] PREEMPT_RT SMP
[ 34.162122] Modules linked in: bluetooth ecdh_generic ecc rfkill icssg_prueth irq_pruss_intc pru_rproc rpmsg_char6
[ 34.210917] CPU: 3 PID: 770 Comm: irqbalance Tainted: G O 5.10.168-rt83-gd14fbab5cc #1
[ 34.220123] Hardware name: Texas Instruments AM654 Base Board (DT)
[ 34.226291] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--)
[ 34.232288] pc : ti_sci_inta_set_affinity+0x88/0xf8
[ 34.237172] lr : ti_sci_inta_set_affinity+0x88/0xf8
[ 34.242045] sp : ffff800012383be0
[ 34.245350] x29: ffff800012383be0 x28: ffff000805fe9e00
[ 34.250655] x27: 0000000000000000 x26: 0000000000000000
[ 34.255960] x25: 0000000000000000 x24: ffff80001117f328
[ 34.261265] x23: ffff000801a4ae00 x22: 0000000000000000
[ 34.266570] x21: ffff0008019dc400 x20: ffff000805f39800
[ 34.271874] x19: ffff800011229118 x18: 0000000000000000
[ 34.277178] x17: 0000000000000000 x16: 0000000000000000
[ 34.282482] x15: 00000000261361d0 x14: 0000000000000000
[ 34.287786] x13: 0000000000000000 x12: 0000000000000000
[ 34.293090] x11: 0000000000000040 x10: ffff800011162060
[ 34.298395] x9 : ffff800011162028 x8 : ffff000806fc9dd0
[ 34.303699] x7 : 0000000000000000 x6 : 0000000000000000
[ 34.309003] x5 : ffff000806fc9da8 x4 : ffff000806fc9e20
[ 34.314307] x3 : 0000000000000000 x2 : 0000000000000000
[ 34.319611] x1 : 0000000000000060 x0 : 0000000000000000
[ 34.324916] Call trace:
[ 34.327356] ti_sci_inta_set_affinity+0x88/0xf8
[ 34.331882] msi_domain_set_affinity+0x40/0xb8
[ 34.336324] irq_do_set_affinity+0x194/0x248
[ 34.340592] irq_set_affinity_locked+0xc8/0x1d8
[ 34.345117] __irq_set_affinity+0x48/0x78
[ 34.349121] write_irq_affinity.isra.0+0xf8/0x118
[ 34.353819] irq_affinity_proc_write+0x24/0x30
[ 34.358256] proc_reg_write+0xa8/0x100
[ 34.362001] vfs_write+0xc0/0x3e8
[ 34.365316] ksys_write+0x6c/0xf8
[ 34.368628] __arm64_sys_write+0x1c/0x28
[ 34.372547] el0_svc_common.constprop.0+0x78/0x1c8
[ 34.377335] do_el0_svc+0x24/0xa0
[ 34.380648] el0_svc+0x14/0x20
[ 34.383702] el0_sync_handler+0xb0/0xb8
[ 34.387535] el0_sync+0x180/0x1c0
[ 34.390851] Code: a9410e62 a9048c02 b9432280 97ef01b1 (f9400c01)
[ 34.396936] ---[ end trace 0000000000000002 ]---
[ 34.401715] note: irqbalance[770] exited with preempt_count 2
[ 34.407677] printk: console [ttyS2]: printing thread stopped