summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-06-26 20:37:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-19 19:43:58 -0400
commit7f14aafc2c02eb0fab458324d0ba91a7fdea3086 (patch)
treecda9f48839fbde3444fde521a9b0069eb06cd81a /drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
parent5ff1b3fe5a30c926e59a55ad25dd4daf430c8579 (diff)
gpu: nvgpu: rework ecc structure and sysfs
- create common file common/ecc.c which include common functions for add ecc counters and remove counters. - common code will create a list of all counter which make it easier to iterate all counters. - Add chip specific file for adding ecc counters. - add linux specific file os/linux/ecc_sysfs.c to export counters to sysfs. - remove obsolete code - MISRA violation for using snprintf is not solved, tracking with jira NVGPU-859 Jira NVGPUT-115 Change-Id: I1905c43c5c9b2b131199807533dee8e63ddc12f4 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1763536 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/ltc_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/ltc_gp10b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
index 1e5807d5..aeeda4a8 100644
--- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
@@ -249,7 +249,7 @@ void gp10b_ltc_isr(struct gk20a *g)
249 ecc_stats_reg_val = 249 ecc_stats_reg_val =
250 gk20a_readl(g, 250 gk20a_readl(g,
251 ltc_ltc0_lts0_dstg_ecc_report_r() + offset); 251 ltc_ltc0_lts0_dstg_ecc_report_r() + offset);
252 g->ecc.ltc.l2_sec_count.counters[ltc*g->ltc_count + slice] += 252 g->ecc.ltc.ecc_sec_count[ltc][slice].counter +=
253 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(ecc_stats_reg_val); 253 ltc_ltc0_lts0_dstg_ecc_report_sec_count_v(ecc_stats_reg_val);
254 ecc_stats_reg_val &= 254 ecc_stats_reg_val &=
255 ~(ltc_ltc0_lts0_dstg_ecc_report_sec_count_m()); 255 ~(ltc_ltc0_lts0_dstg_ecc_report_sec_count_m());
@@ -268,7 +268,7 @@ void gp10b_ltc_isr(struct gk20a *g)
268 ecc_stats_reg_val = 268 ecc_stats_reg_val =
269 gk20a_readl(g, 269 gk20a_readl(g,
270 ltc_ltc0_lts0_dstg_ecc_report_r() + offset); 270 ltc_ltc0_lts0_dstg_ecc_report_r() + offset);
271 g->ecc.ltc.l2_ded_count.counters[ltc*g->ltc_count + slice] += 271 g->ecc.ltc.ecc_ded_count[ltc][slice].counter +=
272 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(ecc_stats_reg_val); 272 ltc_ltc0_lts0_dstg_ecc_report_ded_count_v(ecc_stats_reg_val);
273 ecc_stats_reg_val &= 273 ecc_stats_reg_val &=
274 ~(ltc_ltc0_lts0_dstg_ecc_report_ded_count_m()); 274 ~(ltc_ltc0_lts0_dstg_ecc_report_ded_count_m());