Skip to content

Commit 7eab5c4

Browse files
stephan-ghUlrich Hecht
authored andcommitted
remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice
[ Upstream commit 110be46f5afe27b66caa2d12473a84cd397b1925 ] enable_irq() and disable_irq() are reference counted, so we must make sure that each enable_irq() is always paired with a single disable_irq(). If we call disable_irq() twice followed by just a single enable_irq(), the IRQ will remain disabled forever. For the error handling path in qcom_q6v5_wait_for_start(), disable_irq() will end up being called twice, because disable_irq() also happens in qcom_q6v5_unprepare() when rolling back the call to qcom_q6v5_prepare(). Fix this by dropping disable_irq() in qcom_q6v5_wait_for_start(). Since qcom_q6v5_prepare() is the function that calls enable_irq(), it makes more sense to have the rollback handled always by qcom_q6v5_unprepare(). Fixes: 3b415c8 ("remoteproc: q6v5: Extract common resource handling") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Link: https://lore.kernel.org/r/20250820-rproc-qcom-q6v5-fixes-v2-1-910b1a3aff71@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 084f043 commit 7eab5c4

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/remoteproc/qcom_q6v5.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout)
113113
int ret;
114114

115115
ret = wait_for_completion_timeout(&q6v5->start_done, timeout);
116-
if (!ret)
117-
disable_irq(q6v5->handover_irq);
118-
119116
return !ret ? -ETIMEDOUT : 0;
120117
}
121118
EXPORT_SYMBOL_GPL(qcom_q6v5_wait_for_start);

0 commit comments

Comments
 (0)