Re: [PATCH v17 03/12] accel/rocket: wait for a running IRQ handler before resetting a core

From: Heiko Stübner

Date: Sun Nov 15 2026 - 08:16:53 EST


Am Samstag, 14. November 2026, 04:05:20 Mitteleuropäische Normalzeit schrieb Jiaxing Hu:
> drm_sched_stop() does not wait for a threaded IRQ handler that is already
> running, so call synchronize_irq() after it to make sure the handler has
> finished before the reset.
>
> Before synchronize_irq(), mask the interrupt and clear the raw status, so
> that the NPU core cannot report a completion afterwards.
>
> Do this under job_lock, because the submit path sets the interrupt mask
> under the same lock.
>
> Only touch these registers when the device is powered: check with
> pm_runtime_get_if_active(), so that a register access with the power
> domain off cannot raise an SError.
>
> Suggested-by: Igor Paunovic <royalnet026@xxxxxxxxx>
> Signed-off-by: Jiaxing Hu <gahing@xxxxxxxxxxxxx>
> Tested-by: Igor Paunovic <royalnet026@xxxxxxxxx> # RK3588, three cores, induced reset, JOB_TIMEOUT_MS=2

Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>