linux/drivers/accel/amdxdna
Lizhi Hou 31a1fb32f5 accel/amdxdna: Fix tail-pointer polling in mailbox_get_msg()
[ Upstream commit cd77d5a4aa ]

In mailbox_get_msg(), mailbox_reg_read_non_zero() is called to poll for a
non-zero tail pointer. This assumed that a zero value indicates an error.
However, certain corner cases legitimately produce a zero tail pointer.
To handle these cases, remove mailbox_reg_read_non_zero(). The zero tail
pointer will be treated as a valid rewind event.

Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20251204181603.793824-1-lizhi.hou@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:19:46 -05:00
..
aie2_ctx.c accel/amdxdna: Fix incorrect error code returned for failed chain command 2026-02-26 14:59:14 -08:00
aie2_error.c accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
aie2_message.c accel/amdxdna: Add a function to walk hardware contexts 2025-08-18 08:35:57 -07:00
aie2_msg_priv.h accel/amdxdna: Fix incorrect size of ERT_START_NPU commands 2025-04-10 10:45:39 -07:00
aie2_pci.c accel/amdxdna: Block running under a hypervisor 2026-01-17 16:35:32 +01:00
aie2_pci.h accel/amdxdna: Add a function to walk hardware contexts 2025-08-18 08:35:57 -07:00
aie2_pm.c accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
aie2_psp.c accel/amdxdna: Fix incorrect PSP firmware size 2025-06-09 07:16:32 -07:00
aie2_smu.c accel/amdxdna: Return error when setting clock failed for npu1 2025-01-09 13:53:22 -06:00
aie2_solver.c accel/amdxdna: include linux/slab.h 2024-12-18 08:14:12 -06:00
aie2_solver.h accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
amdxdna_ctx.c accel/amdxdna: Fix dma_fence leak when job is canceled 2025-12-18 14:02:52 +01:00
amdxdna_ctx.h accel/amdxdna: Fix incorrect command state for timed out job 2025-12-18 14:02:45 +01:00
amdxdna_gem.c accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object 2025-12-18 14:02:25 +01:00
amdxdna_gem.h accel/amdxdna: Revise device bo creation and free 2025-06-16 22:29:09 -07:00
amdxdna_mailbox.c accel/amdxdna: Fix tail-pointer polling in mailbox_get_msg() 2026-03-04 07:19:46 -05:00
amdxdna_mailbox.h accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_mailbox_helper.c accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_mailbox_helper.h accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_pci_drv.c accel/amdxdna: Hold mm structure across iommu_sva_unbind_device() 2026-02-26 14:59:14 -08:00
amdxdna_pci_drv.h accel/amdxdna: Hold mm structure across iommu_sva_unbind_device() 2026-02-26 14:59:14 -08:00
amdxdna_sysfs.c accel/amdxdna: Add command execution 2024-11-22 11:43:27 -07:00
amdxdna_ubuf.c accel/amdxdna: Fix memory leak in amdxdna_ubuf_map 2026-02-26 14:59:14 -08:00
amdxdna_ubuf.h accel/amdxdna: Support user space allocated buffer 2025-07-22 08:34:29 -07:00
Kconfig accel/amdxdna: Add a new driver for AMD AI Engine 2024-11-22 11:41:26 -07:00
Makefile accel/amdxdna: Support user space allocated buffer 2025-07-22 08:34:29 -07:00
npu1_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu2_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu4_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu5_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu6_regs.c accel/amdxdna: Declare npu6_dev_priv as static 2025-01-03 23:38:22 -06:00
TODO accel/amdxdna: Add BO import and export 2025-03-28 11:14:06 -07:00