diff options
| author | Jiaxing Hu <gahing@gahingwoo.com> | 2026-11-14 16:05:20 +1300 |
|---|---|---|
| committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2026-11-16 11:25:16 +0100 |
| commit | dce0eba182f2e18c5b5312d6ca18eb23dce73531 (patch) | |
| tree | 8014933381e76db3f2bdeebe05c17705c54e21f5 /rust/kernel/alloc/kvec | |
| parent | 6995680ff5bb79c82edcdc46e9d762d7cb72ac64 (diff) | |
accel/rocket: wait for a running IRQ handler before resetting a core
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.
Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
Suggested-by: Igor Paunovic <royalnet026@gmail.com>
Signed-off-by: Jiaxing Hu <gahing@gahingwoo.com>
Tested-by: Igor Paunovic <royalnet026@gmail.com> # RK3588, three cores, induced reset, JOB_TIMEOUT_MS=2
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Sidong Yang <sidong.yang@furiosa.ai> # RK3588, ROCK 5B+
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
[tomeu: added Fixes]
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://patch.msgid.link/18667b2afdcaae217fa1038f5348ab23ed756bdc.1794615323.git.gahing@gahingwoo.com
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions
