Acknowledged
Created: Jul 27, 2025
Updated: Aug 20, 2025
Found In Version: 10.25.33.1
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: BSP
This issue only occurs when DMA debug is enabled on the rt kernel.
mmcblk0: mmc0:aaaa SC32G 29.7 GiB
================================
WARNING: inconsistent lock state
6.12.40-rt6-yocto-preempt-rt #1 Not tainted
--------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
swapper/0/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
ffff800082d073e8 (&dma_entry_hash[i].lock){?.+.}-{2:2}, at: debug_dma_unmap_sg+0x148/0x2e8
{HARDIRQ-ON-W} state was registered at:
lock_acquire.part.0+0xec/0x258
lock_acquire+0x68/0x88
rt_spin_lock+0x40/0x110
add_dma_entry+0x74/0x2f8
debug_dma_alloc_coherent+0x104/0x140
dma_alloc_attrs+0xe8/0x260
dmam_alloc_attrs+0x74/0xc8
arm_smmu_init_one_queue+0x94/0x148
arm_smmu_device_probe+0x56c/0x1448
platform_probe+0x70/0xe8
really_probe+0xb4/0x2c0
__driver_probe_device+0x80/0x128
driver_probe_device+0x44/0x130
__driver_attach+0xa0/0x180
bus_for_each_dev+0x84/0x100
driver_attach+0x2c/0x40
bus_add_driver+0xec/0x228
driver_register+0x70/0x138
__platform_driver_register+0x2c/0x40
arm_smmu_driver_init+0x28/0x40
do_one_initcall+0x90/0x3a0
kernel_init_freeable+0x2c8/0x338
kernel_init+0x28/0x140
ret_from_fork+0x10/0x20
irq event stamp: 85500
hardirqs last enabled at (85499): [<ffff8000810cd944>] default_idle_call+0x84/0x140
hardirqs last disabled at (85500): [<ffff8000810ca504>] el1_interrupt+0x24/0x68
softirqs last enabled at (7098): [<ffff8000800ada5c>] __local_bh_enable_ip+0x20c/0x260
softirqs last disabled at (7082): [<ffff8000801bb1b0>] cgroup_idr_alloc.constprop.0+0x8/0xc8
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&dma_entry_hash[i].lock);
<Interrupt>
lock(&dma_entry_hash[i].lock);
*** DEADLOCK ***
2 locks held by swapper/0/0:
#0: ffff00011a369540 (&host->irq_handler_lock){-...}-{2:2}, at: cvm_mmc_interrupt+0x258/0x5d8
#1: ffff800081d55438 (rcu_read_lock){....}-{1:2}, at: rt_spin_lock+0x60/0x110
stack backtrace:
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.40-rt6-yocto-preempt-rt #1
Hardware name: Marvell OcteonTX CN96XX board (DT)
Call trace:
dump_backtrace.part.0+0xe0/0x100
show_stack+0x20/0x40
dump_stack_lvl+0x7c/0xb0
dump_stack+0x18/0x28
print_usage_bug.part.0+0x248/0x270
mark_lock+0x4f4/0x780
__lock_acquire+0xf7c/0x1e28
lock_acquire.part.0+0xec/0x258
lock_acquire+0x68/0x88
rt_spin_lock+0x40/0x110
debug_dma_unmap_sg+0x148/0x2e8
dma_unmap_sg_attrs+0x54/0xc0
cvm_mmc_interrupt+0x1a4/0x5d8
__handle_irq_event_percpu+0xac/0x378
handle_irq_event+0x54/0xd0
handle_fasteoi_irq+0xa8/0x1d8
handle_irq_desc+0x3c/0x68
generic_handle_domain_irq+0x24/0x40
gic_handle_irq+0x54/0x120
call_on_irq_stack+0x24/0x30
do_interrupt_handler+0x88/0x98
el1_interrupt+0x34/0x68
el1h_64_irq_handler+0x18/0x28
el1h_64_irq+0x64/0x68
default_idle_call+0x88/0x140
do_idle+0x1ec/0x250
cpu_startup_entry+0x3c/0x50
rest_init+0x178/0x180
start_kernel+0x704/0x710
__primary_switched+0x80/0x90
mmcblk0: p1 p2 p3
thunderx_mmc 0000:01:01.4: mmc1.ios_timing:9 4000pS hint:32 taps:30
thunderx_mmc 0000:01:01.4: mmc1 re-tuning
thunderx_mmc 0000:01:01.4: mmc1/CMD_IN(HS200) 0/25/50 +++++++++++++++++++++++++@+++++++++++++++++++++++++-++++++++++++
thunderx_mmc 0000:01:01.4: mmc1/DATA_IN(HS200) 0/31/63 +++++++++++++++++++++++++++++++@++++++++++++++++++++++++++++++++
eth1 NIC Link is UP 1000 Mbps Full duplex
IP-Config: Complete:
device=eth1, hwaddr=fa:26:24:73:fb:62, ipaddr=128.224.178.128, mask=255.255.254.0, gw=128.224.178.1
host=128.224.178.128, domain=, nis-domain=(none)
bootserver=128.224.178.20, rootserver=128.224.178.20, rootpath=
clk: Disabling unused clocks
PM: genpd: Disabling unused power domains
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Mounted root (nfs filesystem) on device 0:21.
devtmpfs: mounted
Freeing unused kernel memory: 5120K
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
mmc1: new HS200 MMC card at address 0001
mmcblk1: mmc1:0001 R1J56L 13.8 GiB
/lpg-build/cdc/fast_prod/WRL10_25/WRL10_25_GIT/wrlinux-10/setup.sh --machines marvell-cn96xx --templates feature/docker feature/target-toolchain feature/kdump feature/kexec --distros wrlinux --dl-layers=1 --accept-eula=yes
. environment-setup-x86_64-wrlinuxsdk-linux
. oe-init-build-env
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"' >>conf/local.conf
Enable the following lock kernel options:
CONFIG_SLUB_DEBUG_ON=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_PER_CPU_MAPS=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_SCHED_STACK_END_CHECK=y
CONFIG_DEBUG_TIMEKEEPING=y
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCK_STAT=y
CONFIG_LOCKDEP=y
CONFIG_DEBUG_LOCKDEP=y
CONFIG_DEBUG_LIST=y
CONFIG_DMA_API_DEBUG=y
CONFIG_HAVE_DEBUG_BUGVERBOSE=y
CONFIG_RCU_EXPERT=y
bitbake wrlinux-image-std
After building the project, boot the target(#29153).