From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 623142F6902; Mon, 27 Oct 2025 18:52:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761591161; cv=none; b=eCakKU3G7XvYWSr22yXyqC3NH2h28sOasWGQLHTsvII+Y6DeaRDv33NsP9T9nbwh3PPybHbLOSx9dK/leKRh/LPfm3yhkc479I08F0h0zEHwQRzIZc6+FkujKthv9slgxaGC9B1+vG7ApAkYzZ7fThtf6xgQrb6o8utlPH24isI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761591161; c=relaxed/simple; bh=K0EembCDrq6XqGoB1eEfSBX7ITuGS7ZJch8Ui/H1vSg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JrEPUrMR5uQouBw56hqBomG5DHc42HBL0BtBo74Wqi5XWX1OE7wiPL2YPOKY4vLU1CkPlnAcqZmkw3OvaUf7BAu0krxubHcrbTCXj63UOMF8pU9S5SPtHYWoR6phtUj8SR+tOlcoTmdqoGylvGYo7AdT2ZgiwfJgGLmeu5vYonQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L3Il97P8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="L3Il97P8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA669C113D0; Mon, 27 Oct 2025 18:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761591161; bh=K0EembCDrq6XqGoB1eEfSBX7ITuGS7ZJch8Ui/H1vSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L3Il97P8Jl3PW1njjOfrVDVV4u1B6sPuyEZWkoZkp+a8vlZqwT7AsfO4i4VO/axAb X6gYsmEP7+9XuJsJEm+FlzvNvr+gML+ucZ1ur2QeiNBbWbY3uY2MGigJRoK2pGwVOn VWaJB9HpLAouy9pOui0tYB/RLmbVUeg86iTG7jKE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dmitry Baryshkov , Stephan Gerhold , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.10 073/332] remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice Date: Mon, 27 Oct 2025 19:32:06 +0100 Message-ID: <20251027183526.551739119@linuxfoundation.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027183524.611456697@linuxfoundation.org> References: <20251027183524.611456697@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stephan Gerhold [ 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: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Reviewed-by: Dmitry Baryshkov Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20250820-rproc-qcom-q6v5-fixes-v2-1-910b1a3aff71@linaro.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/remoteproc/qcom_q6v5.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index fd6fd36268d93..f2080738ca05e 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -115,9 +115,6 @@ int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout) int ret; ret = wait_for_completion_timeout(&q6v5->start_done, timeout); - if (!ret) - disable_irq(q6v5->handover_irq); - return !ret ? -ETIMEDOUT : 0; } EXPORT_SYMBOL_GPL(qcom_q6v5_wait_for_start); -- 2.51.0