diff options
author | Moti Haimovski <mhaimovski@habana.ai> | 2019-11-03 16:26:44 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2019-11-21 11:35:47 +0200 |
commit | 52c01b0137193ab0c9282ec8d09c6338446e6e9f (patch) | |
tree | eba1f501dcda6d92a85e2fe1f0a0d089de7691d0 /include/uapi | |
parent | e16ee4103770acf365372886eac7c750017c918e (diff) | |
download | linux-52c01b0137193ab0c9282ec8d09c6338446e6e9f.tar.bz2 |
habanalabs: expose reset counters via existing INFO IOCTL
Expose both soft and hard reset counts via INFO IOCTL.
This will allow system management applications to easily check
if the device has undergone reset.
Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/misc/habanalabs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 716e70750f23..4faa2c9767e5 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -98,6 +98,9 @@ enum hl_device_status { * HL_INFO_CLK_RATE - Retrieve the current and maximum clock rate * of the device in MHz. The maximum clock rate is * configurable via sysfs parameter + * HL_INFO_RESET_COUNT - Retrieve the counts of the soft and hard reset + * operations performed on the device since the last + * time the driver was loaded. */ #define HL_INFO_HW_IP_INFO 0 #define HL_INFO_HW_EVENTS 1 @@ -107,6 +110,7 @@ enum hl_device_status { #define HL_INFO_DEVICE_UTILIZATION 6 #define HL_INFO_HW_EVENTS_AGGREGATE 7 #define HL_INFO_CLK_RATE 8 +#define HL_INFO_RESET_COUNT 9 #define HL_INFO_VERSION_MAX_LEN 128 #define HL_INFO_CARD_NAME_MAX_LEN 16 @@ -160,6 +164,11 @@ struct hl_info_clk_rate { __u32 max_clk_rate_mhz; }; +struct hl_info_reset_count { + __u32 hard_reset_cnt; + __u32 soft_reset_cnt; +}; + struct hl_info_args { /* Location of relevant struct in userspace */ __u64 return_pointer; |