From f94c9d19c19883ca2b60acb8a000b34b32da0aa7 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Fri, 9 Mar 2018 13:18:03 -0800 Subject: gpu: nvgpu: gp10b: enhance priv error reporting -Append 0x for info dumped in hex format -Dump subid and priv_level for ERROR_INFO -Decode ERROR_CODE for supported error types Bug 2072157 Bug 200392445 Bug 2055510 Bug 200379815 Change-Id: I78df8ca15421ee37631157082648e9b545367c95 Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1672292 Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h | 10 +++++++++- .../include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h index 1bd5a0f7..ba55658e 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_gpc_gp10b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -72,6 +72,14 @@ static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_r(void) { return 0x00128128U; } +static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_subid_v(u32 r) +{ + return (r >> 24U) & 0x3fU; +} +static inline u32 pri_ringstation_gpc_gpc0_priv_error_info_priv_level_v(u32 r) +{ + return (r >> 20U) & 0x3U; +} static inline u32 pri_ringstation_gpc_gpc0_priv_error_code_r(void) { return 0x0012812cU; diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h index c4d9ef1b..1dcb1a3c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_pri_ringstation_sys_gp10b.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -84,6 +84,14 @@ static inline u32 pri_ringstation_sys_priv_error_info_r(void) { return 0x00122128U; } +static inline u32 pri_ringstation_sys_priv_error_info_subid_v(u32 r) +{ + return (r >> 24U) & 0x3fU; +} +static inline u32 pri_ringstation_sys_priv_error_info_priv_level_v(u32 r) +{ + return (r >> 20U) & 0x3U; +} static inline u32 pri_ringstation_sys_priv_error_code_r(void) { return 0x0012212cU; -- cgit v1.2.2