From: Bryan O'Donoghue <bod@kernel.org>
To: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Hungyu Lin <dennylin0707@gmail.com>,
Stefan Schmidt <stefan.schmidt@linaro.org>,
Hans Verkuil <hverkuil@kernel.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 3/3] media: qcom: iris: Fix IRQ disable depth imbalance on watchdog interrupt
Date: Fri, 13 Nov 2026 01:33:16 +0000 [thread overview]
Message-ID: <713418c4-e84f-441f-a5cd-438ee7572300@kernel.org> (raw)
In-Reply-To: <20261111-fix-disable-irq-safely-v2-3-8e13f68c2ef9@oss.qualcomm.com>
On 11/11/2026 09:05, Vishnu Reddy wrote:
> iris_hfi_isr() disables the IRQ for every interrupt and the threaded
> handler enables it again
This reads like a statement of a bug to me.
> except for a watchdog interrupt, which is left
> masked until the firmware is reset.
Which then gets worse.
iris_vpu_power_off() decides whether
> to add its own disable from core->intr_status, but that is only updated
> by the threaded handler. If a watchdog interrupt is still pending when
> power-off checks it, power-off adds a disable and the handler then skips
> its enable, leaving the depth one higher than the single enable_irq() in
> iris_vpu_power_on() can undo. The IRQ then stays disabled after the
> reset and the firmware can no longer be reached.
Why don't we just do the _simple_ thing and enable the watchdog @
power-on and disable it @ power-off ? Let's at least investigate that.
If its infeasible or too reductive consider: passing IRQF_ONESHOT to
devm_request_threaded_irq() then the kernel will automagically mask the
ISR for you and will re-enable once your threaded handler has run.
We can then remove the watchdog interrupt as an exceptional (no pun)
case from the IRQ.
Either way this flag mechanism smacks of spaghetti code and needs a rethink.
---
bod
prev parent reply other threads:[~2026-11-13 1:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 9:05 [PATCH v2 0/3] media: qcom: iris: Fix IRQ synchronization during power-off Vishnu Reddy
2026-11-11 9:05 ` [PATCH v2 1/3] Revert "media: qcom: iris: use disable_irq() during power-off" Vishnu Reddy
2026-11-13 0:55 ` Bryan O'Donoghue
2026-11-11 9:05 ` [PATCH v2 2/3] media: qcom: iris: Wait for threaded IRQ completion during power-off Vishnu Reddy
2026-11-13 0:55 ` Bryan O'Donoghue
2026-11-11 9:05 ` [PATCH v2 3/3] media: qcom: iris: Fix IRQ disable depth imbalance on watchdog interrupt Vishnu Reddy
2026-11-13 1:33 ` Bryan O'Donoghue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=713418c4-e84f-441f-a5cd-438ee7572300@kernel.org \
--to=bod@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=bryan.odonoghue@linaro.org \
--cc=busanna.reddy@oss.qualcomm.com \
--cc=dennylin0707@gmail.com \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=hverkuil@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan.schmidt@linaro.org \
--cc=vikash.garodia@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®