gpu: nvgpu: update error reporting in av+l

MISC_EC is not supported in platforms like L4T. In such case, -ENODEV
error code will be returned by Safety_Services. This patch updates
error reporting to consider this scenario.

JIRA NVGPU-8094
Bug 3366818
Bug 3491596

Change-Id: I0316571fe44418e738ae784da0584cf1040cb6cb
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2684283
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Rajesh Devaraj
2022-03-20 15:39:50 +00:00
committed by mobile promotions
parent c5822b0d98
commit a06b5ff2d2

View File

@@ -86,12 +86,19 @@ int nvgpu_cic_mon_report_err_safety_services(struct gk20a *g, u32 err_id)
* to report GPU HW errors to Safety_Services via MISC_EC interface. * to report GPU HW errors to Safety_Services via MISC_EC interface.
*/ */
ret = epl_report_misc_ec_error(dev, MISC_EC_SW_ERR_CODE_0, err_id); ret = epl_report_misc_ec_error(dev, MISC_EC_SW_ERR_CODE_0, err_id);
if (ret != 0) { if (ret == 0) {
nvgpu_err(g, "Error reporting to Safety_Services failed"); nvgpu_err(g, "Reported err_id(0x%x) to Safety_Services",
nvgpu_err(g, "ret (%d). err (0x%x)", ret, err_id);
} else {
nvgpu_err(g, "Reported err (0x%x) to Safety_Services",
err_id); err_id);
} else if (ret == -ENODEV) {
/**
* MISC_EC is not supported in L4T.
*/
ret = 0;
nvgpu_err(g, "Error reporting is not supported in "
"this platform");
} else {
nvgpu_err(g, "Error reporting to Safety_Services failed");
nvgpu_err(g, "ret(%d). err_id(0x%x)", ret, err_id);
} }
#endif #endif