memory: tegra: lockdep report for EMC rate change under icc_bw_lock (Tegra30, Tegra114)
From: Patrick Fischer
Date: Tue Dec 01 2026 - 18:24:17 EST
Hi,
with PROVE_LOCKING enabled, lockdep reports a possible circular locking
dependency during boot on two Tegra boards: a Nexus 7 2012 (Tegra30)
running v7.4-rc5, and a Tegra Note 7 (Tegra114) running v7.4-rc3 plus
48 patches on top (Tegra Note 7 device tree, Tegra114 EMC and others).
On the Nexus 7 it showed up in all eight boots with PROVE_LOCKING so
far. After the report lockdep turns itself off, so the rest of the
uptime runs without lock checking.
The chain, as lockdep prints it on Tegra30 (shortened):
&genpd->mlock --> icc_bw_lock --> &reqs->rate_lock
#6 &reqs->rate_lock
tegra_emc_set_min_rate() <- icc_node_add() <- tegra30_emc_probe()
#5 icc_bw_lock
icc_init() (fs_reclaim annotation)
#4 fs_reclaim
kasprintf() in create_regulator() <- tegra_usb_phy_probe()
#3 regulator_ww_class_mutex
regulator_resolve_supply() <- max77620_regulator_probe()
#2 regulator_ww_class_acquire
regulator_set_voltage()
<- tegra_pmc_core_pd_set_performance_state()
#1 &pmc->powergates_lock
tegra_powergate_set() <- genpd_power_on()
#0 &genpd->mlock
genpd_dev_pm_set_performance_state() <- dev_pm_opp_set_rate()
<- tegra_emc_request_rate() <- tegra_emc_set_min_rate()
<- icc_set_bw() <- tegra_devfreq_target()
<- tegra_actmon_delayed_update()
On Tegra114 the last link comes from the probe itself
(tegra_emc_set_min_rate() called from icc_node_add()); on Tegra30 it is
closed at runtime by the actmon devfreq update.
As far as I can tell, all links are mainline code:
- the interconnect (ICC) core calls provider->set() with icc_bw_lock
held, both in icc_node_add() and in icc_set_bw(). For the EMC this
ends in tegra_emc_set_min_rate(), which takes rate_lock
(tegra-emc-common.c; moved there by 8879cff7f86f, the locking
itself is older);
- with rate_lock held, tegra_emc_request_rate() sets the OPP, and the
required OPP goes to the core power domain (genpd->mlock), since the
EMC sits in pd_core on Tegra20/30/114;
- genpd power-on takes powergates_lock (tegra_powergate_set()), and
the core domain sets its regulator voltage under the same lock
(tegra_pmc_core_pd_set_performance_state());
- the regulator core allocates under its ww mutex (fs_reclaim);
- icc_init() annotates that reclaim may take icc_bw_lock
(136191703038, af42269c3523).
I did not find a reclaim path on Tegra that really takes icc_bw_lock, so
this may well be a false positive caused by the global annotation.
Either way it costs the lockdep coverage on these boards.
Tegra124 has no power-domains on the EMC and should not see the genpd
link. I have not tried Tegra20.
rate_lock is only the last hop here: because the ICC core holds
icc_bw_lock around provider->set(), every EMC rate change made from
that callback sets the performance state of the core domain, and with
it the core regulator, under icc_bw_lock.
How should this be handled: should the EMC drivers apply the rate
outside of the ICC set callback (for example from a work item), or is
this something for the interconnect core? I am happy to test patches on
both boards.
I traced the chain through the mainline sources with the help of Claude
Code (an LLM coding assistant); I ran both boards and checked the result
myself.
Both lockdep reports are attached. The Tegra30 kernel carries two KUnit
test patches for input on top of v7.4-rc5 (taint N); its W taint comes
from a cpuidle RCU warning earlier in the same boot, which is not part
of this chain.
Thanks,
Patrick
[ 7.949486] ======================================================
[ 7.956410] WARNING: possible circular locking dependency detected
[ 7.961242] 7.4.0-rc5-00002-g49553783b819 #1 Tainted: G W N
[ 7.966532] ------------------------------------------------------
[ 7.971570] kworker/1:0/24 is trying to acquire lock:
[ 7.976934] c3225c90 (&genpd->mlock){+.+.}-{4:4}, at: genpd_dev_pm_set_performance_state+0x44/0xa8
[ 7.987288]
but task is already holding lock:
[ 7.997337] c4c9fb18 (&reqs->rate_lock){+.+.}-{4:4}, at: tegra_emc_set_min_rate+0x24/0x54
[ 8.002669]
which lock already depends on the new lock.
[ 8.017837]
the existing dependency chain (in reverse order) is:
[ 8.028192]
-> #6 (&reqs->rate_lock){+.+.}-{4:4}:
[ 8.038374] lock_acquire+0x140/0x3dc
[ 8.043760] __mutex_lock+0xbc/0x1188
[ 8.048539] mutex_lock_nested+0x1c/0x24
[ 8.053890] tegra_emc_set_min_rate+0x24/0x54
[ 8.058874] icc_node_add+0xe4/0x158
[ 8.063818] tegra30_emc_probe+0x5f0/0x990
[ 8.068826] platform_probe+0x6c/0x9c
[ 8.073961] really_probe+0xc8/0x2d0
[ 8.078880] __driver_probe_device+0x94/0x1dc
[ 8.083677] driver_probe_device+0x34/0xb8
[ 8.088473] __device_attach_driver+0x98/0xd4
[ 8.093989] bus_for_each_drv+0x84/0xd8
[ 8.100262] __device_attach+0xa8/0x1c8
[ 8.106463] device_initial_probe+0x48/0x70
[ 8.112146] __bus_probe_device+0x24/0x7c
[ 8.118774] bus_probe_device_deferred+0x28/0x64
[ 8.125441] deferred_probe_work_func+0x7c/0xac
[ 8.131581] process_one_work+0x2d4/0x938
[ 8.137978] worker_thread+0x1b0/0x3c0
[ 8.142773] random: crng init done
[ 8.143894] kthread+0x144/0x178
[ 8.143921] ret_from_fork+0x14/0x28
[ 8.143935]
-> #5 (icc_bw_lock){+.+.}-{4:4}:
[ 8.172690] lock_acquire+0x140/0x3dc
[ 8.178865] icc_init+0x40/0xfc
[ 8.184474] do_one_initcall+0x84/0x3c4
[ 8.190341] kernel_init_freeable+0x1c4/0x240
[ 8.196160] kernel_init+0x1c/0x134
[ 8.201555] ret_from_fork+0x14/0x28
[ 8.207242]
-> #4 (fs_reclaim){+.+.}-{0:0}:
[ 8.217953] lock_acquire+0x140/0x3dc
[ 8.223550] fs_reclaim_acquire+0x68/0x9c
[ 8.229219] __kmalloc_node_track_caller_noprof+0x90/0x564
[ 8.234849] kvasprintf+0x58/0xcc
[ 8.240512] kasprintf+0x2c/0x58
[ 8.246134] create_regulator+0x44/0x184
[ 8.251662] _regulator_get_common+0x140/0x3a8
[ 8.257291] _devm_regulator_get+0x50/0x8c
[ 8.262993] tegra_usb_phy_probe+0xec/0x7bc
[ 8.268226] platform_probe+0x6c/0x9c
[ 8.273700] really_probe+0xc8/0x2d0
[ 8.279035] __driver_probe_device+0x94/0x1dc
[ 8.284231] driver_probe_device+0x34/0xb8
[ 8.289681] __driver_attach+0xa4/0x180
[ 8.295230] bus_for_each_dev+0x78/0xc8
[ 8.300316] bus_add_driver+0x164/0x1fc
[ 8.305439] driver_register+0x84/0x138
[ 8.310777] do_one_initcall+0x84/0x3c4
[ 8.316094] kernel_init_freeable+0x1c4/0x240
[ 8.321059] kernel_init+0x1c/0x134
[ 8.326257] ret_from_fork+0x14/0x28
[ 8.331384]
-> #3 (regulator_ww_class_mutex){+.+.}-{4:4}:
[ 8.341143] lock_acquire+0x140/0x3dc
[ 8.346289] regulator_lock_two+0x104/0x4ec
[ 8.351289] regulator_resolve_supply+0xd8/0x72c
[ 8.356159] regulator_register+0x9b4/0xbb8
[ 8.361164] devm_regulator_register+0x50/0x8c
[ 8.366056] max77620_regulator_probe+0x174/0x228
[ 8.370755] platform_probe+0x6c/0x9c
[ 8.375689] really_probe+0xc8/0x2d0
[ 8.380402] __driver_probe_device+0x94/0x1dc
[ 8.385207] driver_probe_device+0x34/0xb8
[ 8.389662] __device_attach_driver+0x98/0xd4
[ 8.394443] bus_for_each_drv+0x84/0xd8
[ 8.399109] __device_attach_async_helper+0xfc/0x14c
[ 8.403425] async_run_entry_fn+0x2c/0xb8
[ 8.407889] process_one_work+0x2d4/0x938
[ 8.412424] worker_thread+0x1b0/0x3c0
[ 8.417168] kthread+0x144/0x178
[ 8.421413] ret_from_fork+0x14/0x28
[ 8.426040]
-> #2 (regulator_ww_class_acquire){+.+.}-{0:0}:
[ 8.435063] reacquire_held_locks+0xf4/0x1fc
[ 8.439320] lock_release+0x1a4/0x3e0
[ 8.443952] __mutex_unlock_slowpath+0x14/0x5f8
[ 8.448489] regulator_lock_dependent+0x1ec/0x2e0
[ 8.453162] regulator_set_voltage+0x40/0x118
[ 8.455144] EXT4-fs (mmcblk0p9): recovery complete
[ 8.456941] _opp_config_regulator_single+0x44/0x118
[ 8.463440] EXT4-fs (mmcblk0p9): mounted filesystem d0dc2eb2-796a-4bcb-9a2f-12b93cc531bd r/w with ordered data mode. Quota mode: disabled.
[ 8.464555] _set_opp+0x1b4/0x598
[ 8.477367] dev_pm_opp_set_opp+0x7c/0xec
[ 8.482454] tegra_pmc_core_pd_set_performance_state+0x44/0xa4
[ 8.487663] _genpd_set_performance_state+0x158/0x17c
[ 8.492963] _genpd_set_parent_state+0xdc/0x104
[ 8.498149] _genpd_set_performance_state+0x5c/0x17c
[ 8.503516] genpd_set_performance_state+0xb4/0xc8
[ 8.508231] genpd_runtime_resume+0x158/0x244
[ 8.511552] n7-init: Wurzel /dev/mmcblk0p9 (PARTLABEL=UDA, ext4, rw), switch_root
[ 8.513377] __rpm_callback+0x3c/0x164
[ 8.513408] rpm_callback+0x60/0x70
[ 8.513417] rpm_resume+0x6d4/0x8a0
[ 8.529230] __pm_runtime_resume+0x44/0x9c
[ 8.529250] host1x_probe+0x5e4/0x864
[ 8.529283] platform_probe+0x6c/0x9c
[ 8.529308] really_probe+0xc8/0x2d0
[ 8.529320] __driver_probe_device+0x94/0x1dc
[ 8.529330] driver_probe_device+0x34/0xb8
[ 8.529338] __device_attach_driver+0x98/0xd4
[ 8.529347] bus_for_each_drv+0x84/0xd8
[ 8.529378] __device_attach+0xa8/0x1c8
[ 8.529386] device_initial_probe+0x48/0x70
[ 8.529398] __bus_probe_device+0x24/0x7c
[ 8.529410] bus_probe_device_deferred+0x28/0x64
[ 8.582822] deferred_probe_work_func+0x7c/0xac
[ 8.582841] process_one_work+0x2d4/0x938
[ 8.591144] worker_thread+0x1b0/0x3c0
[ 8.591161] kthread+0x144/0x178
[ 8.591179] ret_from_fork+0x14/0x28
[ 8.591190]
-> #1 (&pmc->powergates_lock){+.+.}-{4:4}:
[ 8.591213] lock_acquire+0x140/0x3dc
[ 8.591229] __mutex_lock+0xbc/0x1188
[ 8.591248] mutex_lock_nested+0x1c/0x24
[ 8.591259] tegra_powergate_set+0xcc/0xd8
[ 8.591268] tegra_powergate_power_up+0x4c/0x214
[ 8.591277] tegra_genpd_power_on+0x1c/0x50
[ 8.591285] _genpd_power_on+0x8c/0x13c
[ 8.591296] genpd_power_on+0x254/0x4a4
[ 8.591311] __genpd_dev_pm_attach+0x138/0x2a4
[ 8.591321] genpd_dev_pm_attach+0x5c/0x6c
[ 8.591332] dev_pm_domain_attach+0x28/0x50
[ 8.591340] platform_probe+0x40/0x9c
[ 8.591352] really_probe+0xc8/0x2d0
[ 8.591360] __driver_probe_device+0x94/0x1dc
[ 8.591368] driver_probe_device+0x34/0xb8
[ 8.591376] __device_attach_driver+0x98/0xd4
[ 8.591384] bus_for_each_drv+0x84/0xd8
[ 8.591400] __device_attach+0xa8/0x1c8
[ 8.591409] device_initial_probe+0x48/0x70
[ 8.591418] __bus_probe_device+0x24/0x7c
[ 8.591430] bus_probe_device_deferred+0x28/0x64
[ 8.591437] deferred_probe_work_func+0x7c/0xac
[ 8.591446] process_one_work+0x2d4/0x938
[ 8.591458] worker_thread+0x1b0/0x3c0
[ 8.591469] kthread+0x144/0x178
[ 8.591480] ret_from_fork+0x14/0x28
[ 8.591488]
-> #0 (&genpd->mlock){+.+.}-{4:4}:
[ 8.591506] check_prev_add+0x11c/0x17d8
[ 8.591516] __lock_acquire+0xf14/0x1fa8
[ 8.591525] lock_acquire+0x140/0x3dc
[ 8.591534] __mutex_lock+0xbc/0x1188
[ 8.591546] mutex_lock_nested+0x1c/0x24
[ 8.591556] genpd_dev_pm_set_performance_state+0x44/0xa8
[ 8.591568] _set_required_opps+0x80/0x118
[ 8.591600] _set_opp+0x220/0x598
[ 8.591616] dev_pm_opp_set_rate+0x164/0x2b8
[ 8.591628] tegra_emc_request_rate+0x7c/0x11c
[ 8.591642] tegra_emc_set_min_rate+0x3c/0x54
[ 8.591650] apply_constraints+0x60/0x88
[ 8.591673] icc_set_bw+0x128/0x3b8
[ 8.591687] _set_opp_bw.part.0+0x4c/0xa4
[ 8.591698] _set_opp+0x1e4/0x598
[ 8.591712] dev_pm_opp_set_opp+0x7c/0xec
[ 8.591723] tegra_devfreq_target+0x28/0x58
[ 8.591753] devfreq_set_target+0x94/0x360
[ 8.591764] devfreq_update_target+0xa8/0x100
[ 8.591776] tegra_actmon_delayed_update+0x20/0x30
[ 8.591787] process_one_work+0x2d4/0x938
[ 8.591799] worker_thread+0x1b0/0x3c0
[ 8.591809] kthread+0x144/0x178
[ 8.591819] ret_from_fork+0x14/0x28
[ 8.591828]
other info that might help us debug this:
[ 8.591835] Chain exists of:
&genpd->mlock --> icc_bw_lock --> &reqs->rate_lock
[ 8.591856] Possible unsafe locking scenario:
[ 8.591862] CPU0 CPU1
[ 8.591868] ---- ----
[ 8.591871] lock(&reqs->rate_lock);
[ 8.591880] lock(icc_bw_lock);
[ 8.591892] lock(&reqs->rate_lock);
[ 8.591902] lock(&genpd->mlock);
[ 8.591912]
*** DEADLOCK ***
[ 8.591916] locks held by kworker/1:0/24: 5, on CPU#1:
[ 8.591924] #0: c3014eb8 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x4c4/0x938
[ 8.591958] #1: df87df20 ((work_completion)(&(&tegra->cpufreq_update_work)->work)){+.+.}-{0:0}, at: process_one_work+0x268/0x938
[ 8.591987] #2: c4c9183c (&devfreq->lock){+.+.}-{4:4}, at: tegra_actmon_delayed_update+0x18/0x30
[ 8.592017] #3: c226f718 (icc_bw_lock){+.+.}-{4:4}, at: icc_set_bw+0x3c/0x3b8
[ 8.592045] #4: c4c9fb18 (&reqs->rate_lock){+.+.}-{4:4}, at: tegra_emc_set_min_rate+0x24/0x54
[ 8.592069]
stack backtrace:
[ 8.592088] CPU: 1 UID: 0 PID: 24 Comm: kworker/1:0 Tainted: G W N 7.4.0-rc5-00002-g49553783b819 #1 PREEMPT
[ 8.592105] Tainted: [W]=WARN, [N]=TEST
[ 8.592109] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[ 8.592124] Workqueue: events tegra_actmon_delayed_update
[ 8.592141] Call trace:
[ 8.592147] unwind_backtrace from show_stack+0x10/0x14
[ 8.592183] show_stack from dump_stack_lvl+0x6c/0x8c
[ 8.592226] dump_stack_lvl from print_circular_bug+0x334/0x3ac
[ 8.592245] print_circular_bug from check_noncircular+0x190/0x1a8
[ 8.592258] check_noncircular from check_prev_add+0x11c/0x17d8
[ 8.592272] check_prev_add from __lock_acquire+0xf14/0x1fa8
[ 8.592286] __lock_acquire from lock_acquire+0x140/0x3dc
[ 8.592300] lock_acquire from __mutex_lock+0xbc/0x1188
[ 8.592319] __mutex_lock from mutex_lock_nested+0x1c/0x24
[ 8.592334] mutex_lock_nested from genpd_dev_pm_set_performance_state+0x44/0xa8
[ 8.592356] genpd_dev_pm_set_performance_state from _set_required_opps+0x80/0x118
[ 8.592378] _set_required_opps from _set_opp+0x220/0x598
[ 8.592399] _set_opp from dev_pm_opp_set_rate+0x164/0x2b8
[ 8.592417] dev_pm_opp_set_rate from tegra_emc_request_rate+0x7c/0x11c
[ 8.592436] tegra_emc_request_rate from tegra_emc_set_min_rate+0x3c/0x54
[ 8.592447] tegra_emc_set_min_rate from apply_constraints+0x60/0x88
[ 8.592464] apply_constraints from icc_set_bw+0x128/0x3b8
[ 8.592482] icc_set_bw from _set_opp_bw.part.0+0x4c/0xa4
[ 8.592499] _set_opp_bw.part.0 from _set_opp+0x1e4/0x598
[ 8.592516] _set_opp from dev_pm_opp_set_opp+0x7c/0xec
[ 8.592534] dev_pm_opp_set_opp from tegra_devfreq_target+0x28/0x58
[ 8.592562] tegra_devfreq_target from devfreq_set_target+0x94/0x360
[ 8.592580] devfreq_set_target from devfreq_update_target+0xa8/0x100
[ 8.592597] devfreq_update_target from tegra_actmon_delayed_update+0x20/0x30
[ 8.592615] tegra_actmon_delayed_update from process_one_work+0x2d4/0x938
[ 8.592641] process_one_work from worker_thread+0x1b0/0x3c0
[ 8.592659] worker_thread from kthread+0x144/0x178
[ 8.592677] kthread from ret_from_fork+0x14/0x28
[ 8.592690] Exception stack(0xdf87dfb0 to 0xdf87dff8)
[ 3.005519] ======================================================
[ 3.011677] WARNING: possible circular locking dependency detected
[ 3.017847] 7.4.0-rc3-dbg-00048-g396be3d6d487 #1 Not tainted
[ 3.023453] ------------------------------------------------------
[ 3.029632] kworker/u16:0/11 is trying to acquire lock:
[ 3.034806] c393c490 (&genpd->mlock){+.+.}-{4:4}, at: genpd_dev_pm_set_performance_state+0x44/0xa8
[ 3.043788]
but task is already holding lock:
[ 3.049567] c34c8ac0 (&reqs->rate_lock){+.+.}-{4:4}, at: tegra_emc_set_min_rate+0x24/0x54
[ 3.057740]
which lock already depends on the new lock.
[ 3.065839]
the existing dependency chain (in reverse order) is:
[ 3.073309]
-> #6 (&reqs->rate_lock){+.+.}-{4:4}:
[ 3.079494] lock_acquire+0x140/0x3dc
[ 3.083572] __mutex_lock+0xbc/0x1188
[ 3.087809] mutex_lock_nested+0x1c/0x24
[ 3.092152] tegra_emc_set_min_rate+0x24/0x54
[ 3.097054] icc_node_add+0xe4/0x158
[ 3.101145] tegra114_emc_probe+0x83c/0xc60
[ 3.105759] platform_probe+0x6c/0x9c
[ 3.109996] really_probe+0xc8/0x2d0
[ 3.113992] __driver_probe_device+0x94/0x1dc
[ 3.118898] driver_probe_device+0x34/0xb8
[ 3.123465] __device_attach_driver+0x98/0xd4
[ 3.128340] bus_for_each_drv+0x84/0xd8
[ 3.132651] __device_attach+0xa8/0x1c8
[ 3.136999] device_initial_probe+0x48/0x70
[ 3.141688] __bus_probe_device+0x24/0x7c
[ 3.146174] bus_probe_device_deferred+0x28/0x64
[ 3.151311] deferred_probe_work_func+0x7c/0xac
[ 3.156312] process_one_work+0x2c8/0x92c
[ 3.160844] worker_thread+0x1b0/0x3c0
[ 3.165039] kthread+0x144/0x178
[ 3.168841] ret_from_fork+0x14/0x28
[ 3.172840]
-> #5 (icc_bw_lock){+.+.}-{4:4}:
[ 3.178639] lock_acquire+0x140/0x3dc
[ 3.182717] icc_init+0x40/0xfc
[ 3.186357] do_one_initcall+0x84/0x3c4
[ 3.190764] kernel_init_freeable+0x1c4/0x240
[ 3.195546] kernel_init+0x1c/0x130
[ 3.199579] ret_from_fork+0x14/0x28
[ 3.203632]
-> #4 (fs_reclaim){+.+.}-{0:0}:
[ 3.209292] lock_acquire+0x140/0x3dc
[ 3.213425] fs_reclaim_acquire+0x68/0x9c
[ 3.217956] __kmalloc_node_track_caller_noprof+0x90/0x534
[ 3.223913] kvasprintf+0x58/0xcc
[ 3.227749] kasprintf+0x2c/0x58
[ 3.231423] create_regulator+0x44/0x184
[ 3.235871] regulator_resolve_supply+0x2bc/0x72c
[ 3.241094] regulator_register+0x9b4/0xbb8
[ 3.245752] devm_regulator_register+0x50/0x8c
[ 3.250716] palmas_smps_registration+0x170/0x48c
[ 3.255865] palmas_regulators_probe+0x338/0x404
[ 3.261059] platform_probe+0x6c/0x9c
[ 3.265139] really_probe+0xc8/0x2d0
[ 3.269286] __driver_probe_device+0x94/0x1dc
[ 3.274066] driver_probe_device+0x34/0xb8
[ 3.278708] __device_attach_driver+0x98/0xd4
[ 3.283540] bus_for_each_drv+0x84/0xd8
[ 3.287892] __device_attach_async_helper+0xfc/0x14c
[ 3.293332] async_run_entry_fn+0x2c/0xb8
[ 3.297859] process_one_work+0x2c8/0x92c
[ 3.302345] worker_thread+0x1b0/0x3c0
[ 3.306564] kthread+0x144/0x178
[ 3.310332] ret_from_fork+0x14/0x28
[ 3.314389]
-> #3 (regulator_ww_class_mutex){+.+.}-{4:4}:
[ 3.321266] lock_acquire+0x140/0x3dc
[ 3.325396] regulator_lock_two+0x104/0x4ec
[ 3.330105] regulator_resolve_supply+0xd8/0x72c
[ 3.335167] regulator_register+0x9b4/0xbb8
[ 3.339922] devm_regulator_register+0x50/0x8c
[ 3.344788] palmas_smps_registration+0x170/0x48c
[ 3.350064] palmas_regulators_probe+0x338/0x404
[ 3.355100] platform_probe+0x6c/0x9c
[ 3.359345] really_probe+0xc8/0x2d0
[ 3.363332] __driver_probe_device+0x94/0x1dc
[ 3.368234] driver_probe_device+0x34/0xb8
[ 3.372804] __device_attach_driver+0x98/0xd4
[ 3.377683] bus_for_each_drv+0x84/0xd8
[ 3.381991] __device_attach_async_helper+0xfc/0x14c
[ 3.387431] async_run_entry_fn+0x2c/0xb8
[ 3.391931] process_one_work+0x2c8/0x92c
[ 3.396464] worker_thread+0x1b0/0x3c0
[ 3.400734] kthread+0x144/0x178
[ 3.404438] ret_from_fork+0x14/0x28
[ 3.408535]
-> #2 (regulator_ww_class_acquire){+.+.}-{0:0}:
[ 3.415534] reacquire_held_locks+0xf4/0x1fc
[ 3.420273] lock_release+0x1a4/0x3e0
[ 3.424433] __mutex_unlock_slowpath+0x14/0x5f8
[ 3.429485] regulator_lock_dependent+0x1ec/0x2e0
[ 3.434660] regulator_set_voltage+0x40/0x118
[ 3.439536] _opp_config_regulator_single+0x44/0x118
[ 3.444972] _set_opp+0x1b4/0x598
[ 3.448783] dev_pm_opp_set_opp+0x7c/0xec
[ 3.453318] tegra_pmc_core_pd_set_performance_state+0x44/0xa4
[ 3.459669] _genpd_set_performance_state+0x158/0x17c
[ 3.465193] _genpd_set_parent_state+0xdc/0x104
[ 3.470241] _genpd_set_performance_state+0x5c/0x17c
[ 3.475679] genpd_set_performance_state+0xb4/0xc8
[ 3.480989] genpd_runtime_resume+0x158/0x244
[ 3.485817] __rpm_callback+0x3c/0x164
[ 3.490088] rpm_callback+0x60/0x70
[ 3.494023] rpm_resume+0x6d4/0x8a0
[ 3.498089] __pm_runtime_resume+0x44/0x9c
[ 3.502606] tegra_vde_probe+0x2fc/0x534
[ 3.507125] platform_probe+0x6c/0x9c
[ 3.511221] really_probe+0xc8/0x2d0
[ 3.515259] __driver_probe_device+0x94/0x1dc
[ 3.520189] driver_probe_device+0x34/0xb8
[ 3.524705] __device_attach_driver+0x98/0xd4
[ 3.529637] bus_for_each_drv+0x84/0xd8
[ 3.533892] __device_attach+0xa8/0x1c8
[ 3.538276] device_initial_probe+0x48/0x70
[ 3.542932] __bus_probe_device+0x24/0x7c
[ 3.547474] bus_probe_device_deferred+0x28/0x64
[ 3.552555] deferred_probe_work_func+0x7c/0xac
[ 3.557602] process_one_work+0x2c8/0x92c
[ 3.562058] worker_thread+0x1b0/0x3c0
[ 3.566332] kthread+0x144/0x178
[ 3.570081] ret_from_fork+0x14/0x28
[ 3.574133]
-> #1 (&pmc->powergates_lock){+.+.}-{4:4}:
[ 3.580745] lock_acquire+0x140/0x3dc
[ 3.584852] __mutex_lock+0xbc/0x1188
[ 3.589060] mutex_lock_nested+0x1c/0x24
[ 3.593432] tegra_powergate_set+0xcc/0xd8
[ 3.598103] tegra_powergate_power_up+0x4c/0x214
[ 3.603139] tegra_genpd_power_on+0x1c/0x50
[ 3.607893] _genpd_power_on+0x8c/0x13c
[ 3.612151] genpd_power_on+0x254/0x4a4
[ 3.616485] __genpd_dev_pm_attach+0x138/0x2a4
[ 3.621501] genpd_dev_pm_attach+0x5c/0x6c
[ 3.626019] dev_pm_domain_attach+0x28/0x50
[ 3.630776] platform_probe+0x40/0x9c
[ 3.634859] really_probe+0xc8/0x2d0
[ 3.638982] __driver_probe_device+0x94/0x1dc
[ 3.643811] driver_probe_device+0x34/0xb8
[ 3.648429] __device_attach_driver+0x98/0xd4
[ 3.653260] bus_for_each_drv+0x84/0xd8
[ 3.657613] __device_attach+0xa8/0x1c8
[ 3.661898] device_initial_probe+0x48/0x70
[ 3.666603] __bus_probe_device+0x24/0x7c
[ 3.671135] bus_probe_device_deferred+0x28/0x64
[ 3.676226] deferred_probe_work_func+0x7c/0xac
[ 3.681276] process_one_work+0x2c8/0x92c
[ 3.685732] worker_thread+0x1b0/0x3c0
[ 3.690054] kthread+0x144/0x178
[ 3.693704] ret_from_fork+0x14/0x28
[ 3.697827]
-> #0 (&genpd->mlock){+.+.}-{4:4}:
[ 3.703706] check_prev_add+0x11c/0x17d8
[ 3.708142] __lock_acquire+0xf14/0x1fa8
[ 3.712538] lock_acquire+0x140/0x3dc
[ 3.716670] __mutex_lock+0xbc/0x1188
[ 3.720905] mutex_lock_nested+0x1c/0x24
[ 3.725251] genpd_dev_pm_set_performance_state+0x44/0xa8
[ 3.731195] _set_required_opps+0x80/0x118
[ 3.735764] _set_opp+0x90/0x598
[ 3.739514] dev_pm_opp_set_rate+0x164/0x2b8
[ 3.744259] tegra_emc_request_rate+0x7c/0x11c
[ 3.749223] tegra_emc_set_min_rate+0x3c/0x54
[ 3.754025] icc_node_add+0xe4/0x158
[ 3.758176] tegra114_emc_probe+0x83c/0xc60
[ 3.762778] platform_probe+0x6c/0x9c
[ 3.767007] really_probe+0xc8/0x2d0
[ 3.771062] __driver_probe_device+0x94/0x1dc
[ 3.775866] driver_probe_device+0x34/0xb8
[ 3.780534] __device_attach_driver+0x98/0xd4
[ 3.785312] bus_for_each_drv+0x84/0xd8
[ 3.789720] __device_attach+0xa8/0x1c8
[ 3.793979] device_initial_probe+0x48/0x70
[ 3.798708] __bus_probe_device+0x24/0x7c
[ 3.803191] bus_probe_device_deferred+0x28/0x64
[ 3.808331] deferred_probe_work_func+0x7c/0xac
[ 3.813329] process_one_work+0x2c8/0x92c
[ 3.817862] worker_thread+0x1b0/0x3c0
[ 3.822058] kthread+0x144/0x178
[ 3.825811] ret_from_fork+0x14/0x28
[ 3.829911]
other info that might help us debug this:
[ 3.837915] Chain exists of:
&genpd->mlock --> icc_bw_lock --> &reqs->rate_lock
[ 3.848230] Possible unsafe locking scenario:
[ 3.854040] CPU0 CPU1
[ 3.858620] ---- ----
[ 3.863054] lock(&reqs->rate_lock);
[ 3.866691] lock(icc_bw_lock);
[ 3.872488] lock(&reqs->rate_lock);
[ 3.878617] lock(&genpd->mlock);
[ 3.881970]
*** DEADLOCK ***
[ 3.887892] locks held by kworker/u16:0/11: 6, on CPU#1:
[ 3.893152] #0: c24310b8 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x4b8/0x92c
[ 3.902570] #1: f083df20 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x25c/0x92c
[ 3.911036] #2: c27b60b0 (&dev->mutex){....}-{4:4}, at: __device_attach+0x2c/0x1c8
[ 3.918687] #3: c1b61250 (icc_lock){+.+.}-{4:4}, at: icc_node_add+0x2c/0x158
[ 3.925741] #4: c1b61298 (icc_bw_lock){+.+.}-{4:4}, at: icc_node_add+0x38/0x158
[ 3.933080] #5: c34c8ac0 (&reqs->rate_lock){+.+.}-{4:4}, at: tegra_emc_set_min_rate+0x24/0x54
[ 3.941742]
stack backtrace:
[ 3.945998] CPU: 1 UID: 0 PID: 11 Comm: kworker/u16:0 Not tainted 7.4.0-rc3-dbg-00048-g396be3d6d487 #1 PREEMPT
[ 3.956020] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[ 3.962261] Workqueue: events_unbound deferred_probe_work_func
[ 3.968066] Call trace:
[ 3.968089] unwind_backtrace from show_stack+0x10/0x14
[ 3.975763] show_stack from dump_stack_lvl+0x6c/0x8c
[ 3.980811] dump_stack_lvl from print_circular_bug+0x334/0x3ac
[ 3.986683] print_circular_bug from check_noncircular+0x190/0x1a8
[ 3.992856] check_noncircular from check_prev_add+0x11c/0x17d8
[ 3.998750] check_prev_add from __lock_acquire+0xf14/0x1fa8
[ 4.004362] __lock_acquire from lock_acquire+0x140/0x3dc
[ 4.009755] lock_acquire from __mutex_lock+0xbc/0x1188
[ 4.014937] __mutex_lock from mutex_lock_nested+0x1c/0x24
[ 4.020415] mutex_lock_nested from genpd_dev_pm_set_performance_state+0x44/0xa8
[ 4.027783] genpd_dev_pm_set_performance_state from _set_required_opps+0x80/0x118
[ 4.035304] _set_required_opps from _set_opp+0x90/0x598
[ 4.040610] _set_opp from dev_pm_opp_set_rate+0x164/0x2b8
[ 4.046048] dev_pm_opp_set_rate from tegra_emc_request_rate+0x7c/0x11c
[ 4.052658] tegra_emc_request_rate from tegra_emc_set_min_rate+0x3c/0x54
[ 4.059417] tegra_emc_set_min_rate from icc_node_add+0xe4/0x158
[ 4.065377] icc_node_add from tegra114_emc_probe+0x83c/0xc60
[ 4.071115] tegra114_emc_probe from platform_probe+0x6c/0x9c
[ 4.076818] platform_probe from really_probe+0xc8/0x2d0
[ 4.082124] really_probe from __driver_probe_device+0x94/0x1dc
[ 4.088017] __driver_probe_device from driver_probe_device+0x34/0xb8
[ 4.094409] driver_probe_device from __device_attach_driver+0x98/0xd4
[ 4.100930] __device_attach_driver from bus_for_each_drv+0x84/0xd8
[ 4.107245] bus_for_each_drv from __device_attach+0xa8/0x1c8
[ 4.112880] __device_attach from device_initial_probe+0x48/0x70
[ 4.118869] device_initial_probe from __bus_probe_device+0x24/0x7c
[ 4.125090] __bus_probe_device from bus_probe_device_deferred+0x28/0x64
[ 4.131764] bus_probe_device_deferred from deferred_probe_work_func+0x7c/0xac
[ 4.138975] deferred_probe_work_func from process_one_work+0x2c8/0x92c
[ 4.145543] process_one_work from worker_thread+0x1b0/0x3c0
[ 4.151195] worker_thread from kthread+0x144/0x178
[ 4.156030] kthread from ret_from_fork+0x14/0x28
[ 4.160724] Exception stack(0xf083dfb0 to 0xf083dff8)