diff options
author | David Nieto <dmartineznie@nvidia.com> | 2017-05-26 17:36:26 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-04 23:34:58 -0400 |
commit | 3dc28cb1ab934ebcda33933086d7d0ffc8d1f907 (patch) | |
tree | 4a27e428220d8083992c07fb905b430f91162cf8 /drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | |
parent | 345eaef6a76771da9c3e8a5e375fc9d659fb1b2b (diff) |
gpu: nvgpu: add chip specific ECC counters
Add support for ECC counters for HUB MMU
JIRA: GPUT19X-82
Change-Id: I691d5898d4db9fe2cd68f217baa646479ab5cb00
Signed-off-by: David Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1490825
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c index c69e1478..95bbfbd3 100644 --- a/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/gv11b/platform_gv11b_tegra.c | |||
@@ -182,6 +182,13 @@ static struct device_attribute *dev_attr_gpccs_ecc_uncorrected_err_count_array; | |||
182 | static struct device_attribute *dev_attr_l2_cache_ecc_corrected_err_count_array; | 182 | static struct device_attribute *dev_attr_l2_cache_ecc_corrected_err_count_array; |
183 | static struct device_attribute *dev_attr_l2_cache_ecc_uncorrected_err_count_array; | 183 | static struct device_attribute *dev_attr_l2_cache_ecc_uncorrected_err_count_array; |
184 | 184 | ||
185 | static struct device_attribute *dev_attr_mmu_l2tlb_ecc_corrected_err_count_array; | ||
186 | static struct device_attribute *dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array; | ||
187 | static struct device_attribute *dev_attr_mmu_hubtlb_ecc_corrected_err_count_array; | ||
188 | static struct device_attribute *dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array; | ||
189 | static struct device_attribute *dev_attr_mmu_fillunit_ecc_corrected_err_count_array; | ||
190 | static struct device_attribute *dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array; | ||
191 | |||
185 | void gr_gv11b_create_sysfs(struct device *dev) | 192 | void gr_gv11b_create_sysfs(struct device *dev) |
186 | { | 193 | { |
187 | struct gk20a *g = get_gk20a(dev); | 194 | struct gk20a *g = get_gk20a(dev); |
@@ -310,6 +317,49 @@ void gr_gv11b_create_sysfs(struct device *dev) | |||
310 | "mmu_l1tlb_ecc_corrected_err_count", | 317 | "mmu_l1tlb_ecc_corrected_err_count", |
311 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, | 318 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, |
312 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); | 319 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); |
320 | |||
321 | error |= gp10b_ecc_stat_create(dev, | ||
322 | 1, | ||
323 | "eng", | ||
324 | "mmu_l2tlb_ecc_uncorrected_err_count", | ||
325 | &g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count, | ||
326 | dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array); | ||
327 | |||
328 | error |= gp10b_ecc_stat_create(dev, | ||
329 | 1, | ||
330 | "eng", | ||
331 | "mmu_l2tlb_ecc_corrected_err_count", | ||
332 | &g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count, | ||
333 | dev_attr_mmu_l2tlb_ecc_corrected_err_count_array); | ||
334 | |||
335 | error |= gp10b_ecc_stat_create(dev, | ||
336 | 1, | ||
337 | "eng", | ||
338 | "mmu_hubtlb_ecc_uncorrected_err_count", | ||
339 | &g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count, | ||
340 | dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array); | ||
341 | |||
342 | error |= gp10b_ecc_stat_create(dev, | ||
343 | 1, | ||
344 | "eng", | ||
345 | "mmu_hubtlb_ecc_corrected_err_count", | ||
346 | &g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count, | ||
347 | dev_attr_mmu_hubtlb_ecc_corrected_err_count_array); | ||
348 | |||
349 | error |= gp10b_ecc_stat_create(dev, | ||
350 | 1, | ||
351 | "eng", | ||
352 | "mmu_fillunit_ecc_uncorrected_err_count", | ||
353 | &g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count, | ||
354 | dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array); | ||
355 | |||
356 | error |= gp10b_ecc_stat_create(dev, | ||
357 | 1, | ||
358 | "eng", | ||
359 | "mmu_fillunit_ecc_corrected_err_count", | ||
360 | &g->ecc.eng.t19x.mmu_fillunit_corrected_err_count, | ||
361 | dev_attr_mmu_fillunit_ecc_corrected_err_count_array); | ||
362 | |||
313 | if (error) | 363 | if (error) |
314 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); | 364 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); |
315 | } | 365 | } |
@@ -407,4 +457,34 @@ static void gr_gv11b_remove_sysfs(struct device *dev) | |||
407 | g->gr.gpc_count, | 457 | g->gr.gpc_count, |
408 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, | 458 | &g->ecc.gr.t19x.mmu_l1tlb_corrected_err_count, |
409 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); | 459 | dev_attr_mmu_l1tlb_ecc_corrected_err_count_array); |
460 | |||
461 | gp10b_ecc_stat_remove(dev, | ||
462 | 1, | ||
463 | &g->ecc.eng.t19x.mmu_l2tlb_uncorrected_err_count, | ||
464 | dev_attr_mmu_l2tlb_ecc_uncorrected_err_count_array); | ||
465 | |||
466 | gp10b_ecc_stat_remove(dev, | ||
467 | 1, | ||
468 | &g->ecc.eng.t19x.mmu_l2tlb_corrected_err_count, | ||
469 | dev_attr_mmu_l2tlb_ecc_corrected_err_count_array); | ||
470 | |||
471 | gp10b_ecc_stat_remove(dev, | ||
472 | 1, | ||
473 | &g->ecc.eng.t19x.mmu_hubtlb_uncorrected_err_count, | ||
474 | dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_array); | ||
475 | |||
476 | gp10b_ecc_stat_remove(dev, | ||
477 | 1, | ||
478 | &g->ecc.eng.t19x.mmu_hubtlb_corrected_err_count, | ||
479 | dev_attr_mmu_hubtlb_ecc_corrected_err_count_array); | ||
480 | |||
481 | gp10b_ecc_stat_remove(dev, | ||
482 | 1, | ||
483 | &g->ecc.eng.t19x.mmu_fillunit_uncorrected_err_count, | ||
484 | dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array); | ||
485 | |||
486 | gp10b_ecc_stat_remove(dev, | ||
487 | 1, | ||
488 | &g->ecc.eng.t19x.mmu_fillunit_corrected_err_count, | ||
489 | dev_attr_mmu_fillunit_ecc_corrected_err_count_array); | ||
410 | } | 490 | } |