Skip to content

Commit 5295be6

Browse files
vmargolinKobyElbaz
authored andcommitted
accel/habanalabs: add generic message type to get error counters
Add a new CPUCP generic message type to retrieve HBM, SRAM and critical error counters from the device. Signed-off-by: Vitaly Margolin <[email protected]> Reviewed-by: Koby Elbaz <[email protected]> Signed-off-by: Koby Elbaz <[email protected]>
1 parent b4fd8e5 commit 5295be6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/accel/habanalabs/common/habanalabs_ioctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,9 @@ static int send_fw_generic_request(struct hl_device *hdev, struct hl_info_args *
961961
case HL_PASSTHROUGH_VERSIONS:
962962
need_input_buff = false;
963963
break;
964+
case HL_GET_ERR_COUNTERS_CMD:
965+
need_input_buff = true;
966+
break;
964967
default:
965968
return -EINVAL;
966969
}

include/linux/habanalabs/cpucp_if.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,9 +1425,11 @@ struct cpucp_monitor_dump {
14251425
* from "pkt_subidx" field in struct cpucp_packet.
14261426
*
14271427
* HL_PASSTHROUGHT_VERSIONS - Fetch all firmware versions.
1428+
* HL_GET_ERR_COUNTERS_CMD - Command to get error counters
14281429
*/
14291430
enum hl_passthrough_type {
14301431
HL_PASSTHROUGH_VERSIONS,
1432+
HL_GET_ERR_COUNTERS_CMD,
14311433
};
14321434

14331435
#endif /* CPUCP_IF_H */

0 commit comments

Comments
 (0)