From: sashiko-bot@kernel.org
To: "Jiaxing Hu" <gahing@gahingwoo.com>
Cc: dri-devel@lists.freedesktop.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v14 04/15] accel/rocket: let the core suspend after a reset
Date: Thu, 24 Sep 2026 10:35:56 +0000 [thread overview]
Message-ID: <20260924103556.86E801F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924102135.92217-5-gahing@gahingwoo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] pm_runtime: asynchronous pm_runtime_put_autosuspend() during reset aborts hardware recovery
--
commit 95b09cd74a75566f037a5b7f059c69a7c6b7352e
Author: Jiaxing Hu <gahing@gahingwoo.com>
accel/rocket: let the core suspend after a reset
This commit changes the PM counter decrement in rocket_reset() from
pm_runtime_put_noidle() to pm_runtime_put_autosuspend() to allow the
core to suspend.
Link: https://lore.kernel.org/all/20260819073530.6087-1-royalnet026@gmail.com/
> diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
> --- a/drivers/accel/rocket/rocket_job.c
> +++ b/drivers/accel/rocket/rocket_job.c
> @@ -443,12 +443,12 @@ rocket_reset(struct rocket_core *core, struct drm_sched_job *bad)
[ ... ]
> scoped_guard(mutex, &core->job_lock) {
> if (core->in_flight_job)
> - pm_runtime_put_noidle(core->dev);
> + pm_runtime_put_autosuspend(core->dev);
[Severity: High]
Does this asynchronous suspend abort the hardware recovery process?
When a job times out and triggers rocket_reset(), this code now schedules
an asynchronous suspend.
However, at the end of rocket_reset(), drm_sched_start() is immediately
invoked to restart the DRM scheduler. If there are pending jobs in the
queue, the scheduler thread can immediately pull the next job and call
pm_runtime_resume_and_get().
This increments the PM usage count and cancels the pending autosuspend
before the timer expires. Consequently, the device might never enter
RPM_SUSPENDED, its power domain never cycles, and the required bus
interface reset fails to trigger.
This leaves the bus interface stuck, causing the IOMMU to stop answering
and plunging the accelerator into an infinite timeout loop. This
regression can occur when user space submits a batch of jobs and one
induces a timeout, leading to a local denial of service.
Would it be safer to use pm_runtime_put_sync() here?
Using a synchronous put ensures the device is fully suspended before the
next operation proceeds, which aligns with the requirement for hardware
ordering constraints.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924102135.92217-1-gahing@gahingwoo.com?part=4
next prev parent reply other threads:[~2026-09-24 10:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 10:21 [PATCH v14 00/15] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 01/15] accel/rocket: request the core clocks by name Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 02/15] accel/rocket: take the completion register writes under job_lock Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 03/15] accel/rocket: wait for a running IRQ handler before resetting a core Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 04/15] accel/rocket: let the core suspend after a reset Jiaxing Hu
2026-09-24 10:35 ` sashiko-bot [this message]
2026-09-24 10:21 ` [PATCH v14 05/15] accel/rocket: factor the completion tail out of the IRQ handler Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 06/15] dt-bindings: npu: rockchip: add rockchip, rk3576-rknn-core Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 07/15] dt-bindings: power: rockchip: allow resets in a power domain node Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 08/15] dt-bindings: iommu: rockchip: describe the RK3576 NPU MMU Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 09/15] pmdomain: rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-09-24 10:38 ` sashiko-bot
2026-09-24 10:21 ` [PATCH v14 10/15] pmdomain: rockchip: cycle an optional power-domain reset on power-on Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 11/15] accel/rocket: select the per-core clock and reset counts from match data Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 12/15] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 13/15] arm64: dts: rockchip: add NPU core domain clocks and resets to rk3576 Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 14/15] arm64: dts: rockchip: add NPU (RKNN) nodes " Jiaxing Hu
2026-09-24 10:21 ` [PATCH v14 15/15] arm64: dts: rockchip: enable the NPU on rk3576-rock-4d Jiaxing Hu
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=20260924103556.86E801F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gahing@gahingwoo.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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