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 1BF8D1F1313; Mon, 13 Oct 2025 15:16:27 +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=1760368587; cv=none; b=CH4CxAQ8u3Sxresu3nkhS6hn71Z700nJUwf0AdmOtBgNuDPWfwdjtCeG1eyAzWg326VvbNnr9IFqZiBqYi8aeQsamfK+D1RNOEm8xJr1e+MrUQGvgr5I5aWsq9P2GaetEQBScjyFZqkOzfP15jKfufU7jLq4BLTeWueFaIc0BV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760368587; c=relaxed/simple; bh=/8eZ5vNuKvykCOAN6353C2aAfPc5hZrCTYWyMTdc81E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RJpKac6l/4detB8WhtU+OsgJ3klRoaxG62hiFWDiG9FfpqwNfvx3sQAZWIR3okFZ1v2d3iBevogODpPezjwDpuRppVHIAuwR2Q1omNy9pmBgM4idZ+LpI1FmQqgUz7THTiWApCugSsBc7XQxO/ulfGKfQfUR4v/PIItPSGsiCPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=muRwF2EV; 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="muRwF2EV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D295C4CEE7; Mon, 13 Oct 2025 15:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760368586; bh=/8eZ5vNuKvykCOAN6353C2aAfPc5hZrCTYWyMTdc81E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=muRwF2EVWuxYkiCl3y5FVcE0eDEhkoe84PlIjI23O2GJ2MnzAjUX0hc9HUwX4QAu0 rCrn5MjI10NQgIQlWzKtNOvYIXHNbB6EX1hv2tYl8KaODzkzjoOyz9JX18C8wl+pKl x+ePO0GmDhU4PWQljuAwQN7+sZM82nQcEdxa3x40= 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 6.12 180/262] remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice Date: Mon, 13 Oct 2025 16:45:22 +0200 Message-ID: <20251013144332.610617003@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251013144326.116493600@linuxfoundation.org> References: <20251013144326.116493600@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 6.12-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 4ee5e67a9f03f..769c6d6d6a731 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -156,9 +156,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