On 11/12/2024 12:47 PM, Lizhi Hou wrote:
@@ -88,6 +91,8 @@ struct amdxdna_client {
struct list_head node;
pid_t pid;
struct mutex hwctx_lock; /* protect hwctx */
+ /* do NOT wait this srcu when hwctx_lock is hold */
do NOT wait on this srcu when hwctx_lock is held
+ struct srcu_struct hwctx_srcu;
struct idr hwctx_idr;
struct amdxdna_dev *xdna;
struct drm_file *filp;
The significant problem I see currently is that this got merged -
commit b2ef808786d93df36585cee42cfb973fc41636eb
Author: Christian König <ckoenig.leichtzumerken@xxxxxxxxx>
Date: Mon Aug 26 14:25:38 2024 +0200
drm/sched: add optional errno to drm_sched_start()
I can no longer compile this patch. Specifically I see -
INSTALL libsubcmd_headers
UPD include/config/kernel.release
UPD include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC init/version.o
AR init/built-in.a
CC kernel/sys.o
CC drivers/base/firmware_loader/main.o
CC kernel/module/main.o
CC [M] drivers/accel/amdxdna/aie2_ctx.o
CC [M] drivers/accel/amdxdna/aie2_message.o
CC [M] drivers/accel/amdxdna/aie2_pci.o
CC [M] drivers/accel/amdxdna/aie2_psp.o
CC [M] drivers/accel/amdxdna/aie2_smu.o
CC [M] drivers/accel/amdxdna/amdxdna_ctx.o
CC [M] drivers/accel/amdxdna/amdxdna_gem.o
CC [M] drivers/accel/amdxdna/amdxdna_mailbox.o
CC [M] drivers/accel/amdxdna/amdxdna_mailbox_helper.o
CC [M] drivers/accel/amdxdna/amdxdna_pci_drv.o
CC [M] drivers/accel/amdxdna/amdxdna_sysfs.o
CC [M] drivers/accel/amdxdna/npu1_regs.o
CC [M] drivers/accel/amdxdna/npu2_regs.o
CC [M] drivers/accel/amdxdna/npu4_regs.o
CC [M] drivers/accel/amdxdna/npu5_regs.o
drivers/accel/amdxdna/aie2_ctx.c: In function ‘aie2_hwctx_restart’:
drivers/accel/amdxdna/aie2_ctx.c:84:9: error: too few arguments to
function ‘drm_sched_start’
84 | drm_sched_start(&hwctx->priv->sched);
| ^~~~~~~~~~~~~~~
In file included from ./include/trace/events/amdxdna.h:12,
from drivers/accel/amdxdna/aie2_ctx.c:14:
./include/drm/gpu_scheduler.h:593:6: note: declared here
593 | void drm_sched_start(struct drm_gpu_scheduler *sched, int errno);
| ^~~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:229:
drivers/accel/amdxdna/aie2_ctx.o] Error 1
make[5]: *** Waiting for unfinished jobs....
AR drivers/base/firmware_loader/built-in.a
AR drivers/base/built-in.a
make[4]: *** [scripts/Makefile.build:478: drivers/accel/amdxdna] Error 2
make[3]: *** [scripts/Makefile.build:478: drivers/accel] Error 2
make[2]: *** [scripts/Makefile.build:478: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
AR kernel/module/built-in.a
AR kernel/built-in.a
With the above two things fixed:
Reviewed-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx>