Am Sonntag, 1. November 2026, 09:22:55 Mitteleuropäische Normalzeit schrieb 
Jiaxing Hu:
> drm_sched_stop() does not wait for a threaded handler that is already
> running. Call synchronize_irq() after it, outside job_lock, which the
> handler takes.
> 
> Before the sync, mask the block's interrupt and clear its raw status, so
> that an active core cannot signal a completion after it. Do that under
> job_lock, since rocket_job_hw_submit() arms the same mask under that lock,
> and only when pm_runtime_get_if_active() returns a positive count: the
> reset holds no runtime PM reference, and with the domain down a register
> access takes an async SError.
> 
> Igor Paunovic's induced-reset runs on RK3588, including a two-task job that
> puts hw_submit() on the IRQ thread, found no fault; as he put it, "this
> does not show the race is closed".
> 
> Link: https://lore.kernel.org/all/[email protected]/
> Link: 
> https://lore.kernel.org/all/caewpsh5mxtbuknouxm6yecmzyvdowquhvyvhaxq8homthd5...@mail.gmail.com/
> Link: https://lore.kernel.org/all/[email protected]/
> Link: 
> https://lore.kernel.org/all/[email protected]/
> Link: 
> https://lore.kernel.org/all/[email protected]/
> Suggested-by: Igor Paunovic <[email protected]>
> Signed-off-by: Jiaxing Hu <[email protected]>
> Tested-by: Igor Paunovic <[email protected]> # RK3588, three cores, 
> induced reset, JOB_TIMEOUT_MS=2
> ---
>  drivers/accel/rocket/rocket_job.c | 71 +++++++++++++++++++++++++++++--
>  1 file changed, 68 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/accel/rocket/rocket_job.c 
> b/drivers/accel/rocket/rocket_job.c
> index 03e5f094f60b..5b2abf40b618 100644
> --- a/drivers/accel/rocket/rocket_job.c
> +++ b/drivers/accel/rocket/rocket_job.c
> @@ -401,9 +401,74 @@ rocket_reset(struct rocket_core *core, struct 
> drm_sched_job *bad)
>       drm_sched_stop(&core->sched, bad);
>  
>       /*
> -      * Remaining interrupts have been handled, but we might still have
> -      * stuck jobs. Let's make sure the PM counters stay balanced by
> -      * manually calling pm_runtime_put_noidle().

Also, why are you changing the original comment here?
The new wording below, does say essentially the same and you're changing
it again the next patch.

[...]

> +     /*
> +      * No handler is running now, but we might still have stuck jobs. Let's
> +      * make sure the PM counters stay balanced by manually calling
> +      * pm_runtime_put_noidle().
>        */
>       scoped_guard(mutex, &core->job_lock) {
>               if (core->in_flight_job)
> 




Reply via email to