diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c | 331 |
1 files changed, 0 insertions, 331 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c index d62e7932..c9c13197 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gv11b_tegra.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | #include "platform_gp10b.h" | 40 | #include "platform_gp10b.h" |
41 | #include "platform_gp10b_tegra.h" | 41 | #include "platform_gp10b_tegra.h" |
42 | #include "platform_ecc_sysfs.h" | ||
43 | 42 | ||
44 | #include "os_linux.h" | 43 | #include "os_linux.h" |
45 | #include "platform_gk20a_tegra.h" | 44 | #include "platform_gk20a_tegra.h" |
@@ -94,11 +93,6 @@ static int gv11b_tegra_late_probe(struct device *dev) | |||
94 | 93 | ||
95 | static int gv11b_tegra_remove(struct device *dev) | 94 | static int gv11b_tegra_remove(struct device *dev) |
96 | { | 95 | { |
97 | struct gk20a *g = get_gk20a(dev); | ||
98 | |||
99 | if (g->ops.gr.remove_gr_sysfs) | ||
100 | g->ops.gr.remove_gr_sysfs(g); | ||
101 | |||
102 | gv11b_tegra_scale_exit(dev); | 96 | gv11b_tegra_scale_exit(dev); |
103 | 97 | ||
104 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 98 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
@@ -261,328 +255,3 @@ struct gk20a_platform gv11b_tegra_platform = { | |||
261 | 255 | ||
262 | .secure_buffer_size = 667648, | 256 | .secure_buffer_size = 667648, |
263 | }; | 257 | }; |
264 | |||
265 | void gr_gv11b_create_sysfs(struct gk20a *g) | ||
266 | { | ||
267 | struct device *dev = dev_from_gk20a(g); | ||
268 | int error = 0; | ||
269 | |||
270 | /* This stat creation function is called on GR init. GR can get | ||
271 | initialized multiple times but we only need to create the ECC | ||
272 | stats once. Therefore, add the following check to avoid | ||
273 | creating duplicate stat sysfs nodes. */ | ||
274 | if (g->ecc.gr.sm_l1_tag_corrected_err_count.counters != NULL) | ||
275 | return; | ||
276 | |||
277 | gr_gp10b_create_sysfs(g); | ||
278 | |||
279 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
280 | 0, | ||
281 | "sm_l1_tag_ecc_corrected_err_count", | ||
282 | &g->ecc.gr.sm_l1_tag_corrected_err_count); | ||
283 | |||
284 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
285 | 0, | ||
286 | "sm_l1_tag_ecc_uncorrected_err_count", | ||
287 | &g->ecc.gr.sm_l1_tag_uncorrected_err_count); | ||
288 | |||
289 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
290 | 0, | ||
291 | "sm_cbu_ecc_corrected_err_count", | ||
292 | &g->ecc.gr.sm_cbu_corrected_err_count); | ||
293 | |||
294 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
295 | 0, | ||
296 | "sm_cbu_ecc_uncorrected_err_count", | ||
297 | &g->ecc.gr.sm_cbu_uncorrected_err_count); | ||
298 | |||
299 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
300 | 0, | ||
301 | "sm_l1_data_ecc_corrected_err_count", | ||
302 | &g->ecc.gr.sm_l1_data_corrected_err_count); | ||
303 | |||
304 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
305 | 0, | ||
306 | "sm_l1_data_ecc_uncorrected_err_count", | ||
307 | &g->ecc.gr.sm_l1_data_uncorrected_err_count); | ||
308 | |||
309 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
310 | 0, | ||
311 | "sm_icache_ecc_corrected_err_count", | ||
312 | &g->ecc.gr.sm_icache_corrected_err_count); | ||
313 | |||
314 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
315 | 0, | ||
316 | "sm_icache_ecc_uncorrected_err_count", | ||
317 | &g->ecc.gr.sm_icache_uncorrected_err_count); | ||
318 | |||
319 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
320 | 0, | ||
321 | "gcc_l15_ecc_corrected_err_count", | ||
322 | &g->ecc.gr.gcc_l15_corrected_err_count); | ||
323 | |||
324 | error |= nvgpu_gr_ecc_stat_create(dev, | ||
325 | 0, | ||
326 | "gcc_l15_ecc_uncorrected_err_count", | ||
327 | &g->ecc.gr.gcc_l15_uncorrected_err_count); | ||
328 | |||
329 | error |= nvgpu_ecc_stat_create(dev, | ||
330 | g->ltc_count, | ||
331 | 0, | ||
332 | "ltc", | ||
333 | NULL, | ||
334 | "l2_cache_uncorrected_err_count", | ||
335 | &g->ecc.ltc.l2_cache_uncorrected_err_count); | ||
336 | |||
337 | error |= nvgpu_ecc_stat_create(dev, | ||
338 | g->ltc_count, | ||
339 | 0, | ||
340 | "ltc", | ||
341 | NULL, | ||
342 | "l2_cache_corrected_err_count", | ||
343 | &g->ecc.ltc.l2_cache_corrected_err_count); | ||
344 | |||
345 | error |= nvgpu_ecc_stat_create(dev, | ||
346 | 1, | ||
347 | 0, | ||
348 | "gpc", | ||
349 | NULL, | ||
350 | "fecs_ecc_uncorrected_err_count", | ||
351 | &g->ecc.gr.fecs_uncorrected_err_count); | ||
352 | |||
353 | error |= nvgpu_ecc_stat_create(dev, | ||
354 | 1, | ||
355 | 0, | ||
356 | "gpc", | ||
357 | NULL, | ||
358 | "fecs_ecc_corrected_err_count", | ||
359 | &g->ecc.gr.fecs_corrected_err_count); | ||
360 | |||
361 | error |= nvgpu_ecc_stat_create(dev, | ||
362 | g->gr.gpc_count, | ||
363 | 0, | ||
364 | "gpc", | ||
365 | NULL, | ||
366 | "gpccs_ecc_uncorrected_err_count", | ||
367 | &g->ecc.gr.gpccs_uncorrected_err_count); | ||
368 | |||
369 | error |= nvgpu_ecc_stat_create(dev, | ||
370 | g->gr.gpc_count, | ||
371 | 0, | ||
372 | "gpc", | ||
373 | NULL, | ||
374 | "gpccs_ecc_corrected_err_count", | ||
375 | &g->ecc.gr.gpccs_corrected_err_count); | ||
376 | |||
377 | error |= nvgpu_ecc_stat_create(dev, | ||
378 | g->gr.gpc_count, | ||
379 | 0, | ||
380 | "gpc", | ||
381 | NULL, | ||
382 | "mmu_l1tlb_ecc_uncorrected_err_count", | ||
383 | &g->ecc.gr.mmu_l1tlb_uncorrected_err_count); | ||
384 | |||
385 | error |= nvgpu_ecc_stat_create(dev, | ||
386 | g->gr.gpc_count, | ||
387 | 0, | ||
388 | "gpc", | ||
389 | NULL, | ||
390 | "mmu_l1tlb_ecc_corrected_err_count", | ||
391 | &g->ecc.gr.mmu_l1tlb_corrected_err_count); | ||
392 | |||
393 | error |= nvgpu_ecc_stat_create(dev, | ||
394 | 1, | ||
395 | 0, | ||
396 | "eng", | ||
397 | NULL, | ||
398 | "mmu_l2tlb_ecc_uncorrected_err_count", | ||
399 | &g->ecc.fb.mmu_l2tlb_uncorrected_err_count); | ||
400 | |||
401 | error |= nvgpu_ecc_stat_create(dev, | ||
402 | 1, | ||
403 | 0, | ||
404 | "eng", | ||
405 | NULL, | ||
406 | "mmu_l2tlb_ecc_corrected_err_count", | ||
407 | &g->ecc.fb.mmu_l2tlb_corrected_err_count); | ||
408 | |||
409 | error |= nvgpu_ecc_stat_create(dev, | ||
410 | 1, | ||
411 | 0, | ||
412 | "eng", | ||
413 | NULL, | ||
414 | "mmu_hubtlb_ecc_uncorrected_err_count", | ||
415 | &g->ecc.fb.mmu_hubtlb_uncorrected_err_count); | ||
416 | |||
417 | error |= nvgpu_ecc_stat_create(dev, | ||
418 | 1, | ||
419 | 0, | ||
420 | "eng", | ||
421 | NULL, | ||
422 | "mmu_hubtlb_ecc_corrected_err_count", | ||
423 | &g->ecc.fb.mmu_hubtlb_corrected_err_count); | ||
424 | |||
425 | error |= nvgpu_ecc_stat_create(dev, | ||
426 | 1, | ||
427 | 0, | ||
428 | "eng", | ||
429 | NULL, | ||
430 | "mmu_fillunit_ecc_uncorrected_err_count", | ||
431 | &g->ecc.fb.mmu_fillunit_uncorrected_err_count); | ||
432 | |||
433 | error |= nvgpu_ecc_stat_create(dev, | ||
434 | 1, | ||
435 | 0, | ||
436 | "eng", | ||
437 | NULL, | ||
438 | "mmu_fillunit_ecc_corrected_err_count", | ||
439 | &g->ecc.fb.mmu_fillunit_corrected_err_count); | ||
440 | |||
441 | error |= nvgpu_ecc_stat_create(dev, | ||
442 | 1, | ||
443 | 0, | ||
444 | "eng", | ||
445 | NULL, | ||
446 | "pmu_ecc_uncorrected_err_count", | ||
447 | &g->ecc.pmu.pmu_uncorrected_err_count); | ||
448 | |||
449 | error |= nvgpu_ecc_stat_create(dev, | ||
450 | 1, | ||
451 | 0, | ||
452 | "eng", | ||
453 | NULL, | ||
454 | "pmu_ecc_corrected_err_count", | ||
455 | &g->ecc.pmu.pmu_corrected_err_count); | ||
456 | |||
457 | if (error) | ||
458 | dev_err(dev, "Failed to create gv11b sysfs attributes!\n"); | ||
459 | } | ||
460 | |||
461 | void gr_gv11b_remove_sysfs(struct gk20a *g) | ||
462 | { | ||
463 | struct device *dev = dev_from_gk20a(g); | ||
464 | |||
465 | if (!g->ecc.gr.sm_l1_tag_corrected_err_count.counters) | ||
466 | return; | ||
467 | gr_gp10b_remove_sysfs(g); | ||
468 | |||
469 | nvgpu_gr_ecc_stat_remove(dev, | ||
470 | 0, | ||
471 | &g->ecc.gr.sm_l1_tag_corrected_err_count); | ||
472 | |||
473 | nvgpu_gr_ecc_stat_remove(dev, | ||
474 | 0, | ||
475 | &g->ecc.gr.sm_l1_tag_uncorrected_err_count); | ||
476 | |||
477 | nvgpu_gr_ecc_stat_remove(dev, | ||
478 | 0, | ||
479 | &g->ecc.gr.sm_cbu_corrected_err_count); | ||
480 | |||
481 | nvgpu_gr_ecc_stat_remove(dev, | ||
482 | 0, | ||
483 | &g->ecc.gr.sm_cbu_uncorrected_err_count); | ||
484 | |||
485 | nvgpu_gr_ecc_stat_remove(dev, | ||
486 | 0, | ||
487 | &g->ecc.gr.sm_l1_data_corrected_err_count); | ||
488 | |||
489 | nvgpu_gr_ecc_stat_remove(dev, | ||
490 | 0, | ||
491 | &g->ecc.gr.sm_l1_data_uncorrected_err_count); | ||
492 | |||
493 | nvgpu_gr_ecc_stat_remove(dev, | ||
494 | 0, | ||
495 | &g->ecc.gr.sm_icache_corrected_err_count); | ||
496 | |||
497 | nvgpu_gr_ecc_stat_remove(dev, | ||
498 | 0, | ||
499 | &g->ecc.gr.sm_icache_uncorrected_err_count); | ||
500 | |||
501 | nvgpu_gr_ecc_stat_remove(dev, | ||
502 | 0, | ||
503 | &g->ecc.gr.gcc_l15_corrected_err_count); | ||
504 | |||
505 | nvgpu_gr_ecc_stat_remove(dev, | ||
506 | 0, | ||
507 | &g->ecc.gr.gcc_l15_uncorrected_err_count); | ||
508 | |||
509 | nvgpu_ecc_stat_remove(dev, | ||
510 | g->ltc_count, | ||
511 | 0, | ||
512 | &g->ecc.ltc.l2_cache_uncorrected_err_count); | ||
513 | |||
514 | nvgpu_ecc_stat_remove(dev, | ||
515 | g->ltc_count, | ||
516 | 0, | ||
517 | &g->ecc.ltc.l2_cache_corrected_err_count); | ||
518 | |||
519 | nvgpu_ecc_stat_remove(dev, | ||
520 | 1, | ||
521 | 0, | ||
522 | &g->ecc.gr.fecs_uncorrected_err_count); | ||
523 | |||
524 | nvgpu_ecc_stat_remove(dev, | ||
525 | 1, | ||
526 | 0, | ||
527 | &g->ecc.gr.fecs_corrected_err_count); | ||
528 | |||
529 | nvgpu_ecc_stat_remove(dev, | ||
530 | g->gr.gpc_count, | ||
531 | 0, | ||
532 | &g->ecc.gr.gpccs_uncorrected_err_count); | ||
533 | |||
534 | nvgpu_ecc_stat_remove(dev, | ||
535 | g->gr.gpc_count, | ||
536 | 0, | ||
537 | &g->ecc.gr.gpccs_corrected_err_count); | ||
538 | |||
539 | nvgpu_ecc_stat_remove(dev, | ||
540 | g->gr.gpc_count, | ||
541 | 0, | ||
542 | &g->ecc.gr.mmu_l1tlb_uncorrected_err_count); | ||
543 | |||
544 | nvgpu_ecc_stat_remove(dev, | ||
545 | g->gr.gpc_count, | ||
546 | 0, | ||
547 | &g->ecc.gr.mmu_l1tlb_corrected_err_count); | ||
548 | |||
549 | nvgpu_ecc_stat_remove(dev, | ||
550 | 1, | ||
551 | 0, | ||
552 | &g->ecc.fb.mmu_l2tlb_uncorrected_err_count); | ||
553 | |||
554 | nvgpu_ecc_stat_remove(dev, | ||
555 | 1, | ||
556 | 0, | ||
557 | &g->ecc.fb.mmu_l2tlb_corrected_err_count); | ||
558 | |||
559 | nvgpu_ecc_stat_remove(dev, | ||
560 | 1, | ||
561 | 0, | ||
562 | &g->ecc.fb.mmu_hubtlb_uncorrected_err_count); | ||
563 | |||
564 | nvgpu_ecc_stat_remove(dev, | ||
565 | 1, | ||
566 | 0, | ||
567 | &g->ecc.fb.mmu_hubtlb_corrected_err_count); | ||
568 | |||
569 | nvgpu_ecc_stat_remove(dev, | ||
570 | 1, | ||
571 | 0, | ||
572 | &g->ecc.fb.mmu_fillunit_uncorrected_err_count); | ||
573 | |||
574 | nvgpu_ecc_stat_remove(dev, | ||
575 | 1, | ||
576 | 0, | ||
577 | &g->ecc.fb.mmu_fillunit_corrected_err_count); | ||
578 | |||
579 | nvgpu_ecc_stat_remove(dev, | ||
580 | 1, | ||
581 | 0, | ||
582 | &g->ecc.pmu.pmu_uncorrected_err_count); | ||
583 | |||
584 | nvgpu_ecc_stat_remove(dev, | ||
585 | 1, | ||
586 | 0, | ||
587 | &g->ecc.pmu.pmu_corrected_err_count); | ||
588 | } | ||