Part Number: TDA4VH-Q1
Hi,
I am currently running into Kernel panics when I want to do a atomic compare-exchange operation on specific memory addresses.
This happens both on DDR and on MSMC-SRAM. The memory-addresses are properly carved-out in the device-tree and aligned.
Crashes happen both when using memory-mapped /dev/mem from user space or accessing raw iomap'ed memory from Kernel space.
I think the problematic assembler instructions are LDARX / STLXR.
Any hints what I should investigate?
Here is a dump of the Kernel panic:
[12360.523401] SError Interrupt on CPU2, code 0x00000000bf000002 -- SError [12360.523415] CPU: 2 PID: 669 Comm: devmem2 Not tainted 6.1.46-rt13-00085-gfea3501294f9-dirty #1 25c60401117e7ee7ce43f409e60b80442b2b75dd [12360.523423] Hardware name: basic-2 (J784S4) (DT) [12360.523425] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [12360.523429] pc : el0_da+0x2c/0xcc [12360.523446] lr : el0t_64_sync_handler+0xd4/0x150 [12360.523452] sp : ffff80000c0cbe80 [12360.523454] x29: ffff80000c0cbe80 x28: ffff0008012b8000 x27: 0000000000000000 [12360.523461] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 [12360.523466] x23: 0000000060000000 x22: 0000aaaaad0413b8 x21: 00000000ffffffff [12360.523470] x20: ffff800805de2000 x19: ffff80000c0cbeb0 x18: ffff80000a55d010 [12360.523474] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [12360.523479] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 [12360.523483] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 [12360.523487] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 [12360.523490] x5 : 0000000000000000 x4 : ffff80000c0cbeb0 x3 : 0000000000000000 [12360.523494] x2 : ffff0008012b8000 x1 : 000000009200004f x0 : 0000ffff93aed000 [12360.523499] Kernel panic - not syncing: Asynchronous SError Interrupt [12360.523503] CPU: 2 PID: 669 Comm: devmem2 Not tainted 6.1.46-rt13-00085-gfea3501294f9-dirty #1 25c60401117e7ee7ce43f409e60b80442b2b75dd [12360.523506] Hardware name: basic-2 (J784S4) (DT) [12360.523508] Call trace: [12360.523510] dump_backtrace.part.0+0x110/0x11c [12360.523517] show_stack+0x24/0x50 [12360.523520] dump_stack_lvl+0x68/0x9c [12360.523524] dump_stack+0x1c/0x48 [12360.523528] panic+0x184/0x364 [12360.523533] add_taint+0x0/0xf0 [12360.523537] arm64_serror_panic+0x7c/0x90 [12360.523541] do_serror+0x78/0x7c [12360.523543] el1h_64_error_handler+0x34/0x60 [12360.523548] el1h_64_error+0x64/0x68 [12360.523551] el0_da+0x2c/0xcc [12360.523555] el0t_64_sync_handler+0xd4/0x150 [12360.523559] el0t_64_sync+0x194/0x198 [12360.710345] SMP: stopping secondary CPUs [12360.710354] Kernel Offset: disabled [12360.710356] CPU features: 0x40000,20028084,0000420b [12360.710359] Memory Limit: none
I am implementing a lock-free queue to exchange data between A72 and R5F cores.
Accessing the same memory regions from R5F side works fine. Also atomic compare-exchange works fine here.
Regards,
Matthias