mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: bvec for struct nvgpu_tsg_sm_error_state fields
Add Setter and Getter methods for accessing tsg->sm_error_states. Getter returns a constant pointer for struct nvgpu_tsg_sm_error_state. This renders it unnecessary to add BVEC for above fields for the struct in multiple locations. The current design ensures that only a constant pointer is obtained from the owner unit i.e. FIFO. The following new methods are added. Both unit tests and BVEC tests are added for them as well. nvgpu_tsg_store_sm_error_state nvgpu_tsg_get_sm_error_state Jira NVGPU-6947 Change-Id: I82c22a2774862c8579baa41b6fb8292fa164704a Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> (cherry picked from commit 79574638671a0c6efe41cd3423668fcd1bd96826) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2556938 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
6361653633
commit
791dc18666
@@ -276,7 +276,7 @@ static int nvgpu_dbg_gpu_ioctl_read_single_sm_error_state(
|
||||
struct nvgpu_dbg_gpu_read_single_sm_error_state_args *args)
|
||||
{
|
||||
struct gk20a *g = dbg_s->g;
|
||||
struct nvgpu_tsg_sm_error_state *sm_error_state;
|
||||
const struct nvgpu_tsg_sm_error_state *sm_error_state = NULL;
|
||||
struct nvgpu_dbg_gpu_sm_error_state_record sm_error_state_record;
|
||||
struct nvgpu_channel *ch;
|
||||
struct nvgpu_tsg *tsg;
|
||||
@@ -307,7 +307,7 @@ static int nvgpu_dbg_gpu_ioctl_read_single_sm_error_state(
|
||||
|
||||
nvgpu_speculation_barrier();
|
||||
|
||||
sm_error_state = tsg->sm_error_states + sm_id;
|
||||
sm_error_state = nvgpu_tsg_get_sm_error_state(tsg, sm_id);
|
||||
sm_error_state_record.hww_global_esr =
|
||||
sm_error_state->hww_global_esr;
|
||||
sm_error_state_record.hww_warp_esr =
|
||||
|
||||
Reference in New Issue
Block a user