summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/debug_pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/debug_pmu.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/debug_pmu.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/debug_pmu.c b/drivers/gpu/nvgpu/common/linux/debug_pmu.c
index 1c0b2520..191fcb0e 100644
--- a/drivers/gpu/nvgpu/common/linux/debug_pmu.c
+++ b/drivers/gpu/nvgpu/common/linux/debug_pmu.c
@@ -14,7 +14,6 @@
14 14
15#include <nvgpu/enabled.h> 15#include <nvgpu/enabled.h>
16#include "debug_pmu.h" 16#include "debug_pmu.h"
17#include "gk20a/platform_gk20a.h"
18#include "os_linux.h" 17#include "os_linux.h"
19 18
20#include <linux/debugfs.h> 19#include <linux/debugfs.h>
@@ -420,64 +419,64 @@ static const struct file_operations security_fops = {
420int gk20a_pmu_debugfs_init(struct gk20a *g) 419int gk20a_pmu_debugfs_init(struct gk20a *g)
421{ 420{
422 struct dentry *d; 421 struct dentry *d;
423 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); 422 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
424 423
425 d = debugfs_create_file( 424 d = debugfs_create_file(
426 "lpwr_debug", S_IRUGO|S_IWUSR, platform->debugfs, g, 425 "lpwr_debug", S_IRUGO|S_IWUSR, l->debugfs, g,
427 &lpwr_debug_fops); 426 &lpwr_debug_fops);
428 if (!d) 427 if (!d)
429 goto err_out; 428 goto err_out;
430 429
431 d = debugfs_create_file( 430 d = debugfs_create_file(
432 "mscg_residency", S_IRUGO|S_IWUSR, platform->debugfs, g, 431 "mscg_residency", S_IRUGO|S_IWUSR, l->debugfs, g,
433 &mscg_stat_fops); 432 &mscg_stat_fops);
434 if (!d) 433 if (!d)
435 goto err_out; 434 goto err_out;
436 435
437 d = debugfs_create_file( 436 d = debugfs_create_file(
438 "mscg_transitions", S_IRUGO, platform->debugfs, g, 437 "mscg_transitions", S_IRUGO, l->debugfs, g,
439 &mscg_transitions_fops); 438 &mscg_transitions_fops);
440 if (!d) 439 if (!d)
441 goto err_out; 440 goto err_out;
442 441
443 d = debugfs_create_file( 442 d = debugfs_create_file(
444 "elpg_residency", S_IRUGO|S_IWUSR, platform->debugfs, g, 443 "elpg_residency", S_IRUGO|S_IWUSR, l->debugfs, g,
445 &elpg_stat_fops); 444 &elpg_stat_fops);
446 if (!d) 445 if (!d)
447 goto err_out; 446 goto err_out;
448 447
449 d = debugfs_create_file( 448 d = debugfs_create_file(
450 "elpg_transitions", S_IRUGO, platform->debugfs, g, 449 "elpg_transitions", S_IRUGO, l->debugfs, g,
451 &elpg_transitions_fops); 450 &elpg_transitions_fops);
452 if (!d) 451 if (!d)
453 goto err_out; 452 goto err_out;
454 453
455 d = debugfs_create_file( 454 d = debugfs_create_file(
456 "falc_trace", S_IRUGO, platform->debugfs, g, 455 "falc_trace", S_IRUGO, l->debugfs, g,
457 &falc_trace_fops); 456 &falc_trace_fops);
458 if (!d) 457 if (!d)
459 goto err_out; 458 goto err_out;
460 459
461 d = debugfs_create_file( 460 d = debugfs_create_file(
462 "perfmon_events_enable", S_IRUGO, platform->debugfs, g, 461 "perfmon_events_enable", S_IRUGO, l->debugfs, g,
463 &perfmon_events_enable_fops); 462 &perfmon_events_enable_fops);
464 if (!d) 463 if (!d)
465 goto err_out; 464 goto err_out;
466 465
467 d = debugfs_create_file( 466 d = debugfs_create_file(
468 "perfmon_events_count", S_IRUGO, platform->debugfs, g, 467 "perfmon_events_count", S_IRUGO, l->debugfs, g,
469 &perfmon_events_count_fops); 468 &perfmon_events_count_fops);
470 if (!d) 469 if (!d)
471 goto err_out; 470 goto err_out;
472 471
473 d = debugfs_create_file( 472 d = debugfs_create_file(
474 "pmu_security", S_IRUGO, platform->debugfs, g, 473 "pmu_security", S_IRUGO, l->debugfs, g,
475 &security_fops); 474 &security_fops);
476 if (!d) 475 if (!d)
477 goto err_out; 476 goto err_out;
478 return 0; 477 return 0;
479err_out: 478err_out:
480 pr_err("%s: Failed to make debugfs node\n", __func__); 479 pr_err("%s: Failed to make debugfs node\n", __func__);
481 debugfs_remove_recursive(platform->debugfs); 480 debugfs_remove_recursive(l->debugfs);
482 return -ENOMEM; 481 return -ENOMEM;
483} 482}