]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
accel/amdxdna: Add a function to walk hardware contexts
authorLizhi Hou <lizhi.hou@amd.com>
Fri, 15 Aug 2025 17:16:34 +0000 (10:16 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Mon, 18 Aug 2025 15:35:57 +0000 (08:35 -0700)
commitc8cea4371e5eca30cda8660aabb337747dabc51d
tree2f861806470b005cb947ec5338c3c35c376fec39
parentcb640b2ca54617f4a9d4d6efd5ff2afd6be11f19
accel/amdxdna: Add a function to walk hardware contexts

Walking hardware contexts created by a process is duplicated in multiple
spots. Add a function, amdxdna_hwctx_walk(), and replace all spots.

hwctx_srcu and dev_lock are good enough to protect hardware context list.
Remove hwctx_lock.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250815171634.3417487-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_ctx.c
drivers/accel/amdxdna/aie2_message.c
drivers/accel/amdxdna/aie2_pci.c
drivers/accel/amdxdna/aie2_pci.h
drivers/accel/amdxdna/amdxdna_ctx.c
drivers/accel/amdxdna/amdxdna_ctx.h
drivers/accel/amdxdna/amdxdna_pci_drv.c
drivers/accel/amdxdna/amdxdna_pci_drv.h