mmc: sdhci-msm: Remove bus vote without delay when gating clocks
Whenever a job in workqueue with WQ_MEM_RECLAIM flag set tries
to execute another job without WQ_MEM_RECLAIM flag set, kernel
dumps below warning call stack of potential deadlock.
WQ_MEM_RECLAIM kblockd:blk_mq_run_work_fn is flushing
!WQ_MEM_RECLAIM events:sdhci_msm_bus_work
check_flush_dependency+0x118/0x120
start_flush_work+0x88/0x2d0
__cancel_work_timer+0x140/0x1e8
cancel_delayed_work_sync+0x20/0x30
sdhci_msm_bus_cancel_work_and_set_vote+0x34/0x148
sdhci_msm_enable_controller_clock+0x88/0x918
sdhci_msm_runtime_resume+0x34/0x260
pm_generic_runtime_resume+0x34/0x48
__rpm_callback+0x178/0x280
rpm_resume+0x564/0x7f8
__pm_runtime_resume+0x7c/0xa0
__mmc_claim_host+0x2b4/0x2f0
mmc_get_card+0x34/0x50
mmc_mq_queue_rq+0x1a4/0x280
blk_mq_dispatch_rq_list+0x264/0x748
blk_mq_do_dispatch_sched+0xc4/0x118
blk_mq_sched_dispatch_requests+0x130/0x190
__blk_mq_run_hw_queue+0xcc/0x148
blk_mq_run_work_fn+0x24/0x30
process_one_work+0x328/0x6b0
worker_thread+0x330/0x4d0
kthread+0x128/0x138
Above is observed when sdcc clocks are ungated in request context
which have WQ_MEM_RECLAIM flag set, but delayed work invoked in
this context do not have WQ_MEM_RECLAIM flag set.
To fix this issue, remove bus vote without deferring any job
when gating sdcc clocks, as gating and ungating of sdcc clock is
now part of runtime pm.
Change-Id: I7b7fb1a7b60029fb5a3c2afd0e8eefeb3f480f4c
Signed-off-by:
Ram Prakash Gupta <rampraka@codeaurora.org>
Loading
Please register or sign in to comment