diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-03-09 04:21:43 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-19 11:07:03 -0400 |
commit | 04e45bc943e9703c26f229dfbe558d94418acbe1 (patch) | |
tree | 541c62a32055255e82cc953b79b50c8925903f12 /drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h | |
parent | 9cf7e23f57d8669d99886a3c82d4997b94c35df8 (diff) |
gpu: nvgpu: support storing/reading single SM error state
Add support to store error state of single SM before
preprocessing SM exception
Error state is stored as :
struct nvgpu_dbg_gpu_sm_error_state_record {
u32 hww_global_esr;
u32 hww_warp_esr;
u64 hww_warp_esr_pc;
u32 hww_global_esr_report_mask;
u32 hww_warp_esr_report_mask;
}
Note that we can safely append new fields to above
structure in the future if required
Also, add IOCTL NVGPU_DBG_GPU_IOCTL_READ_SINGLE_SM_ERROR_STATE
to support reading SM's error state by user space
Bug 200156699
Change-Id: I9a62cb01e8a35c720b52d5d202986347706c7308
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1120329
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h index 48aa1524..ab2a975b 100644 --- a/drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/hw_gr_gk20a.h | |||
@@ -2122,6 +2122,10 @@ static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_f(u32 v) | |||
2122 | { | 2122 | { |
2123 | return (v & 0xffff) << 0; | 2123 | return (v & 0xffff) << 0; |
2124 | } | 2124 | } |
2125 | static inline u32 gr_gpc0_tpc0_sm_cfg_sm_id_v(u32 r) | ||
2126 | { | ||
2127 | return (r >> 0) & 0xffff; | ||
2128 | } | ||
2125 | static inline u32 gr_gpc0_tpc0_sm_arch_r(void) | 2129 | static inline u32 gr_gpc0_tpc0_sm_arch_r(void) |
2126 | { | 2130 | { |
2127 | return 0x0050469c; | 2131 | return 0x0050469c; |