| a2b0c33e | 31-Oct-2025 |
Zack McKevitt <zachary.mckevitt@oss.qualcomm.com> |
accel/qaic: Add qaic_ prefix to irq_polling_work
Rename irq_polling_work to qaic_irq_polling_work to reduce ambiguity and avoid potential naming conflicts in the future.
Signed-off-by: Zack McKevit
accel/qaic: Add qaic_ prefix to irq_polling_work
Rename irq_polling_work to qaic_irq_polling_work to reduce ambiguity and avoid potential naming conflicts in the future.
Signed-off-by: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251031192511.3179130-1-zachary.mckevitt@oss.qualcomm.com
show more ...
|
| 6bc1fe6c | 31-Oct-2025 |
Pranjal Ramajor Asha Kanojiya <pkanojiy@codeaurora.org> |
accel/qaic: Collect crashdump from SSR channel
After subsystem of the device has crashed it sends a message with command DEBUG_TRANSFER_INFO to kernel(host). Send ACK for that message and then prepa
accel/qaic: Collect crashdump from SSR channel
After subsystem of the device has crashed it sends a message with command DEBUG_TRANSFER_INFO to kernel(host). Send ACK for that message and then prepare to collect the ramdump of the subsystem
Steps of crashdump collection is as follows, 1) Device sends DEBUG_TRANSFER_INFO message indicating that device wants to send crashdump. 2) Send an acknowledgment to that message either ACK or NACK. a) NACK will inform the device that host will not download the crashdump b) ACK will inform the device that host will download the crashdump 3) Along with the DEBUG_TRANSFER_INFO we receive a table base address and its length, use that to download that table from device. a) This table is meta data of the crashdump and not the actual crashdump. 4) After we respond as ACK for message received on step 1) we start downloading the table. Use series of MEMORY_READ/MEMORY_READ_RSP SSR commands to download the entire table. 5) Each entry in the table represents a segment of crashdump. Once the table downloading is complete, iterate through each entry of table and download each crashdump segment(same as table itself). Table entry contains the memory base address and length along with other info. 6) After the entire crashdump is downloaded send DEBUG_TRANSFER_DONE which marks that host is terminating the crashdump transfer. This message can be send in both success or error case. 7) After receiving DEBUG_TRANSFER_DONE_RSP hand over the crashdump to dev_coredumpv() and free all the necessary memory.
Co-developed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Co-developed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Signed-off-by: Pranjal Ramajor Asha Kanojiya <pkanojiy@codeaurora.org> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Signed-off-by: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251031174059.2814445-4-zachary.mckevitt@oss.qualcomm.com
show more ...
|
| 9675093a | 31-Oct-2025 |
Jeffrey Hugo <jhugo@codeaurora.org> |
accel/qaic: Implement basic SSR handling
Subsystem restart (SSR) for a qaic device means that a NSP has crashed, and will be restarted. However the restart process will lose any state associated wi
accel/qaic: Implement basic SSR handling
Subsystem restart (SSR) for a qaic device means that a NSP has crashed, and will be restarted. However the restart process will lose any state associated with activation, so the user will need to do some recovery.
While SSR has the provision to collect a crash dump, this patch does not implement support for it.
Co-developed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Co-developed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Co-developed-by: Troy Hanson <quic_thanson@quicinc.com> Signed-off-by: Troy Hanson <quic_thanson@quicinc.com> Co-developed-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com> Signed-off-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Signed-off-by: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> [jhugo: Fix minor checkpatch whitespace issues] Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251031174059.2814445-3-zachary.mckevitt@oss.qualcomm.com
show more ...
|
| f286066e | 31-Oct-2025 |
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> |
accel/qaic: Add DMA Bridge Channel(DBC) sysfs and uevents
Expose sysfs files for each DBC representing the current state of that DBC. For example, sysfs for DBC ID 0 and accel minor number 0 looks l
accel/qaic: Add DMA Bridge Channel(DBC) sysfs and uevents
Expose sysfs files for each DBC representing the current state of that DBC. For example, sysfs for DBC ID 0 and accel minor number 0 looks like this,
/sys/class/accel/accel0/dbc0_state
Following are the states and their corresponding values, DBC_STATE_IDLE (0) DBC_STATE_ASSIGNED (1) DBC_STATE_BEFORE_SHUTDOWN (2) DBC_STATE_AFTER_SHUTDOWN (3) DBC_STATE_BEFORE_POWER_UP (4) DBC_STATE_AFTER_POWER_UP (5)
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Signed-off-by: Zack McKevitt <zachary.mckevitt@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251031174059.2814445-2-zachary.mckevitt@oss.qualcomm.com
show more ...
|
| a80c98b6 | 22-Oct-2025 |
Troy Hanson <thanson@qti.qualcomm.com> |
accel/qaic: Rename constant for clarity
QAIC_MANAGE_EXT_MSG_LENGTH is ambiguous and has been confused with QAIC_MANAGE_MAX_MSG_LENGTH. Rename it to clarify it's a wire length.
Signed-off-by: Troy H
accel/qaic: Rename constant for clarity
QAIC_MANAGE_EXT_MSG_LENGTH is ambiguous and has been confused with QAIC_MANAGE_MAX_MSG_LENGTH. Rename it to clarify it's a wire length.
Signed-off-by: Troy Hanson <thanson@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> [jhugo: capitalize subject] Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251022141606.3740470-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| b3ba217d | 22-Oct-2025 |
Aswin Venkatesan <aswivenk@qti.qualcomm.com> |
accel/qaic: Fix comment
Replace the word "Qranium" with "qaic" in the function parameter description.
Signed-off-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com> Signed-off-by: Youssef Samir <youss
accel/qaic: Fix comment
Replace the word "Qranium" with "qaic" in the function parameter description.
Signed-off-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> [jhugo: adjust word wrapping in commit text] Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://patch.msgid.link/20251022124107.3712466-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| ddf70cb6 | 15-Oct-2025 |
Zack McKevitt <zmckevit@qti.qualcomm.com> |
accel/qaic: Fix mismatched types in min()
Use min_t() instead of min() to resolve compiler warnings for mismatched types.
Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.com> Signed-off-by: You
accel/qaic: Fix mismatched types in min()
Use min_t() instead of min() to resolve compiler warnings for mismatched types.
Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251015153715.184143-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 7fb19ea1 | 08-Oct-2025 |
Jeff Hugo <jeff.hugo@oss.qualcomm.com> |
accel/qaic: Support the new READ_DATA implementation
AIC200 uses the newer "XBL" firmware implementation which changes the expectations of how READ_DATA is performed. Larger data requests are suppor
accel/qaic: Support the new READ_DATA implementation
AIC200 uses the newer "XBL" firmware implementation which changes the expectations of how READ_DATA is performed. Larger data requests are supported via streaming the data over the transport instead of requiring a single transport transfer for everything.
Co-developed-by: Carl Vanderlip <quic_carlv@quicinc.com> Signed-off-by: Carl Vanderlip <quic_carlv@quicinc.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007224045.605374-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 4ddf4ddf | 08-Oct-2025 |
Youssef Samir <quic_yabdulra@quicinc.com> |
accel/qaic: Ensure entry belongs to DBC in qaic_perf_stats_bo_ioctl()
struct qaic_perf_stats is defined to have a DBC specified in the header, followed by struct qaic_perf_stats_entry instances, eac
accel/qaic: Ensure entry belongs to DBC in qaic_perf_stats_bo_ioctl()
struct qaic_perf_stats is defined to have a DBC specified in the header, followed by struct qaic_perf_stats_entry instances, each pointing to a BO that is associated with the DBC. Currently, qaic_perf_stats_bo_ioctl() does not check if the entries belong to the DBC specified in the header. Therefore, add checks to ensure that each entry in the request is sliced and belongs to hdr.dbc_id.
Co-developed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007221212.559474-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 6bee9090 | 07-Oct-2025 |
Carl Vanderlip <quic_carlv@quicinc.com> |
accel/qaic: Use overflow check function instead of division
Division is an expensive operation. Overflow check functions exist already. Use existing overflow check functions rather than dividing to
accel/qaic: Use overflow check function instead of division
Division is an expensive operation. Overflow check functions exist already. Use existing overflow check functions rather than dividing to check for overflow.
Signed-off-by: Carl Vanderlip <quic_carlv@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007174218.469867-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 8134da2c | 07-Oct-2025 |
Aswin Venkatesan <aswivenk@qti.qualcomm.com> |
accel/qaic: Fix incorrect error return path
Found via code inspection that when encode_message() fails in the middle of processing, instead of returning the actual error code, it always returns -EIN
accel/qaic: Fix incorrect error return path
Found via code inspection that when encode_message() fails in the middle of processing, instead of returning the actual error code, it always returns -EINVAL. This is because the entire message length has not been processed, and the error code is set to -EINVAL. Instead, take the 'out' path on failure to return the actual error code.
Signed-off-by: Aswin Venkatesan <aswivenk@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007170130.445878-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 754fcd22 | 07-Oct-2025 |
Youssef Samir <quic_yabdulra@quicinc.com> |
accel/qaic: Remove redundant retry_count = 0 statement
If msg_xfer() is called and the channel ring does not have enough room to accommodate the whole message, the function sleeps and tries again. I
accel/qaic: Remove redundant retry_count = 0 statement
If msg_xfer() is called and the channel ring does not have enough room to accommodate the whole message, the function sleeps and tries again. It uses retry_count to keep track of the number of retrials done. This variable is not used after the space check succeeds. So, remove the retry_count = 0 statement used later in the function.
Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007161148.422744-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 52e59f77 | 07-Oct-2025 |
Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> |
accel/qaic: Synchronize access to DBC request queue head & tail pointer
Two threads of the same process can potential read and write parallelly to head and tail pointers of the same DBC request queu
accel/qaic: Synchronize access to DBC request queue head & tail pointer
Two threads of the same process can potential read and write parallelly to head and tail pointers of the same DBC request queue. This could lead to a race condition and corrupt the DBC request queue.
Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> [jhugo: Add fixes tag] Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007061837.206132-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 5f63e033 | 07-Oct-2025 |
Zack McKevitt <zmckevit@qti.qualcomm.com> |
accel/qaic: Include signal.h in qaic_control.c
Include linux/sched/signal.h in qaic_control.c to avoid implicit inclusion of signal_pending().
Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.co
accel/qaic: Include signal.h in qaic_control.c
Include linux/sched/signal.h in qaic_control.c to avoid implicit inclusion of signal_pending().
Signed-off-by: Zack McKevitt <zmckevit@qti.qualcomm.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007154525.415039-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| 11f08c30 | 07-Oct-2025 |
Youssef Samir <quic_yabdulra@quicinc.com> |
accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
Currently, if find_and_map_user_pages() takes a DMA xfer request from the user with a length field set to 0, or in a rare case,
accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
Currently, if find_and_map_user_pages() takes a DMA xfer request from the user with a length field set to 0, or in a rare case, the host receives QAIC_TRANS_DMA_XFER_CONT from the device where resources->xferred_dma_size is equal to the requested transaction size, the function will return 0 before allocating an sgt or setting the fields of the dma_xfer struct. In that case, encode_addr_size_pairs() will try to access the sgt which will lead to a general protection fault.
Return an EINVAL in case the user provides a zero-sized ALP, or the device requests continuation after all of the bytes have been transferred.
Fixes: 96d3c1cadedb ("accel/qaic: Clean up integer overflow checking in map_user_pages()") Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007122320.339654-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| f6d9329a | 07-Oct-2025 |
Youssef Samir <quic_yabdulra@quicinc.com> |
accel/qaic: Use kvcalloc() for slice requests allocation
When a BO is created, qaic will use the page allocator to request the memory chunks that the BO will be composed of in-memory. The number of
accel/qaic: Use kvcalloc() for slice requests allocation
When a BO is created, qaic will use the page allocator to request the memory chunks that the BO will be composed of in-memory. The number of chunks increases when memory is segmented. For example, a 16MB BO can be composed of four 4MB chunks or 4096 4KB chunks.
A BO is then sliced into a single or multiple slices to be transferred to the device on the DBC's xfer queue. For that to happen, the slice needs to encode its memory chunks into DBC requests and keep track of them in an array, which is allocated using kcalloc(). Knowing that the BO might be very fragmented, this array can grow so large that the allocation may fail to find contiguous memory for it.
Replace kcalloc() with kvcalloc() to allocate the DBC requests array for a slice.
Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007121845.337382-1-youssef.abdulrahman@oss.qualcomm.com
show more ...
|
| e68c9944 | 22-Aug-2025 |
Chelsy Ratnawat <chelsyratnawat2001@gmail.com> |
accel/qaic: Replace snprintf() with sysfs_emit() in sysfs show functions
Documentation/filesystems/sysfs.rst mentions that show() should only use sysfs_emit() or sysfs_emit_at() when formatting the
accel/qaic: Replace snprintf() with sysfs_emit() in sysfs show functions
Documentation/filesystems/sysfs.rst mentions that show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. So replace snprintf() with sysfs_emit().
Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> [jhugo: Fix commit text typos] Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250822112804.1726592-1-chelsyratnawat2001@gmail.com
show more ...
|
| bed12912 | 17-Sep-2025 |
Thorsten Blum <thorsten.blum@linux.dev> |
accel/qaic: Replace kcalloc + copy_from_user with memdup_array_user
Replace kcalloc() followed by copy_from_user() with memdup_array_user() to improve and simplify both __qaic_execute_bo_ioctl() and
accel/qaic: Replace kcalloc + copy_from_user with memdup_array_user
Replace kcalloc() followed by copy_from_user() with memdup_array_user() to improve and simplify both __qaic_execute_bo_ioctl() and qaic_perf_stats_bo_ioctl().
In __qaic_execute_bo_ioctl(), return early if an error occurs and remove the obsolete 'free_exec' label.
Since memdup_array_user() already checks for multiplication overflow, remove the manual check in __qaic_execute_bo_ioctl(). Remove any unused local variables accordingly.
Since 'ret = copy_from_user()' has been removed, initialize 'ret = 0' to preserve the same return value on success.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250917124805.90395-4-thorsten.blum@linux.dev
show more ...
|