diff options
author | Vinod G <vinodg@nvidia.com> | 2018-05-23 20:22:03 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:06 -0400 |
commit | d84e822128a224eda4a703dad530716331dd36bd (patch) | |
tree | 1be84de0d8e1407fa109b1e51e89cf8f5fa94b82 /include | |
parent | 40cefb666f3767059383052346d4c0faa9195a48 (diff) |
gpu: nvgpu: Add Ctrl API to read SM error state
Expose IOCTL to Ctrl node to read Single SM error
under NVGPU_GPU_IOCTL_READ_SINGLE_SM_ERROR_STATE
bug 200412642
JIRA NVGPU-700
Change-Id: I3cbcf4d7f23a53dbd2350b38a5e259559d5fd3af
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1728931
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index b36509b0..908e5c57 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -864,6 +864,38 @@ struct nvgpu_gpu_set_deterministic_opts_args { | |||
864 | __u64 channels; /* in */ | 864 | __u64 channels; /* in */ |
865 | }; | 865 | }; |
866 | 866 | ||
867 | /* | ||
868 | * This struct helps to report the SM error state of a single SM. | ||
869 | * This acts upon the currently resident GR context. | ||
870 | * Global Error status register | ||
871 | * Warp Error status register | ||
872 | * Warp Error status register PC | ||
873 | * Global Error status register Report Mask | ||
874 | * Warp Error status register Report Mask | ||
875 | */ | ||
876 | struct nvgpu_gpu_sm_error_state_record { | ||
877 | __u32 global_esr; | ||
878 | __u32 warp_esr; | ||
879 | __u64 warp_esr_pc; | ||
880 | __u32 global_esr_report_mask; | ||
881 | __u32 warp_esr_report_mask; | ||
882 | }; | ||
883 | |||
884 | /* | ||
885 | * This struct helps to read the SM error state. | ||
886 | */ | ||
887 | struct nvgpu_gpu_read_single_sm_error_state_args { | ||
888 | /* Valid SM ID */ | ||
889 | __u32 sm_id; | ||
890 | __u32 reserved; | ||
891 | /* | ||
892 | * This is pointer to the struct nvgpu_gpu_sm_error_state_record | ||
893 | */ | ||
894 | __u64 record_mem; | ||
895 | /* size of the record size to read */ | ||
896 | __u64 record_size; | ||
897 | }; | ||
898 | |||
867 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ | 899 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ |
868 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) | 900 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) |
869 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ | 901 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ |
@@ -949,8 +981,11 @@ struct nvgpu_gpu_set_deterministic_opts_args { | |||
949 | #define NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS \ | 981 | #define NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS \ |
950 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 40, \ | 982 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 40, \ |
951 | struct nvgpu_gpu_set_deterministic_opts_args) | 983 | struct nvgpu_gpu_set_deterministic_opts_args) |
984 | #define NVGPU_GPU_IOCTL_READ_SINGLE_SM_ERROR_STATE \ | ||
985 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 41, \ | ||
986 | struct nvgpu_gpu_read_single_sm_error_state_args) | ||
952 | #define NVGPU_GPU_IOCTL_LAST \ | 987 | #define NVGPU_GPU_IOCTL_LAST \ |
953 | _IOC_NR(NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS) | 988 | _IOC_NR(NVGPU_GPU_IOCTL_READ_SINGLE_SM_ERROR_STATE) |
954 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ | 989 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ |
955 | sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) | 990 | sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) |
956 | 991 | ||