]> www.infradead.org Git - users/jedix/linux-maple.git/commit
accel/amdxdna: Fix incorrect size of ERT_START_NPU commands
authorLizhi Hou <lizhi.hou@amd.com>
Wed, 9 Apr 2025 21:00:13 +0000 (14:00 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Thu, 10 Apr 2025 17:45:39 +0000 (10:45 -0700)
commit6c161732ea6467c6dea0c35810ca8e8d1ae135f1
tree04ab083a2d4f02718e3511178895d8f9b287315f
parentc180b00366d99911f4573dca5ac97a8633f2e8f9
accel/amdxdna: Fix incorrect size of ERT_START_NPU commands

When multiple ERT_START_NPU commands are combined in one buffer, the
buffer size calculation is incorrect. Also, the condition to make sure
the buffer size is not beyond 4K is also fixed.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250409210013.10854-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_message.c
drivers/accel/amdxdna/aie2_msg_priv.h