diff options
| author | Jiaxing Hu <gahing@gahingwoo.com> | 2026-11-14 16:05:19 +1300 |
|---|---|---|
| committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2026-11-16 11:23:33 +0100 |
| commit | 6995680ff5bb79c82edcdc46e9d762d7cb72ac64 (patch) | |
| tree | d062305f1ef71e1c781ef43e2fd6c1d95a293db2 /rust/kernel/alloc/kvec/errors.rs | |
| parent | b2895c80151171fc792c2d467d2743d2660b2b29 (diff) | |
accel/rocket: take the completion register writes under job_lock
The IRQ handler writes OPERATION_ENABLE and INTERRUPT_CLEAR before it
takes job_lock, while rocket_job_hw_submit() sets OPERATION_ENABLE to 1
under that lock.
If the two run at the same time, the 0 written by the IRQ handler can
overwrite the 1 written for a new task and stop a task that has just
started.
Move both writes into the existing scoped_guard(), so they are under the
same lock as the submit.
Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
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>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://patch.msgid.link/1adbff3238fd312e23daab83ed936ad13d7f223f.1794615323.git.gahing@gahingwoo.com
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
