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 8252F330B0C; Fri, 17 Oct 2025 15:49:09 +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=1760716149; cv=none; b=Oy7M2RjaXMfooRhdCUh9RrszNSczyA3whEwuzxR3uXHWxMbOI1T+CNqrlkrVWK+QlbmpYSghSTECi/souCWmKNNzpAUTsW9kBlXHIacjj4DVxuw/nmYTZRWQtaKgsGMHfXB1nExICImCmb2p3ets3zHixvlUZ/c9sYwI+yjdyBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760716149; c=relaxed/simple; bh=RCzuVqCmYba3yIG9x5D9eMAixHmiR2O08qasezbOaJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=efgGS/YELz6XC+NFFkb1TqJPdUuUJJXHws4lPl4Ek0yGwlQj8x6ToPy1HYQSJ0dxXYROPOQA5Ero1zKQ7Mc6FKTJo139RE0ZDTQ8gTQZy88Qb6nYUWyF2P5bafarE/UEdxAXHrX5uG9FzecL6RmB8Hh6nSQTQwqtpRmAaOaKVK4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WNyjsxjC; 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="WNyjsxjC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E863C4CEE7; Fri, 17 Oct 2025 15:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760716149; bh=RCzuVqCmYba3yIG9x5D9eMAixHmiR2O08qasezbOaJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNyjsxjCNd4n3LJs4LbK7rZDgLULmQdXYnjVfMIxVXpG0vhN8lpZS6Z5tVTaZe1xs f2ru+VwC09rVrcEQ2DjFdIXAxkgWwcvYHIfLy8VPTEFILQO5+h22Mby7V/IbdWrBTN PbOXZC3vmRwk3JlMUv9WFnfOBb0KqO1n1lVS+5vE= 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.15 091/276] remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice Date: Fri, 17 Oct 2025 16:53:04 +0200 Message-ID: <20251017145145.809846558@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251017145142.382145055@linuxfoundation.org> References: <20251017145142.382145055@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.15-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 7e9244c748da6..515c6d68e47ce 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -116,9 +116,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