summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_pmu.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/debug_pmu.c b/drivers/gpu/nvgpu/os/linux/debug_pmu.c
index f4ed992d..f3e36d0c 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_pmu.c
+++ b/drivers/gpu/nvgpu/os/linux/debug_pmu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2017 NVIDIA Corporation. All rights reserved. 2 * Copyright (C) 2017-2019 NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * This software is licensed under the terms of the GNU General Public 4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 5 * License version 2, as published by the Free Software Foundation, and
@@ -452,28 +452,31 @@ int gk20a_pmu_debugfs_init(struct gk20a *g)
452 goto err_out; 452 goto err_out;
453 453
454 d = debugfs_create_file( 454 d = debugfs_create_file(
455 "falc_trace", S_IRUGO, l->debugfs, g, 455 "pmu_security", S_IRUGO, l->debugfs, g,
456 &falc_trace_fops); 456 &security_fops);
457 if (!d) 457 if (!d)
458 goto err_out; 458 goto err_out;
459 459
460 d = debugfs_create_file( 460 /* No access to PMU if virtual */
461 "perfmon_events_enable", S_IRUGO, l->debugfs, g, 461 if (!g->is_virtual) {
462 d = debugfs_create_file(
463 "falc_trace", S_IRUGO, l->debugfs, g,
464 &falc_trace_fops);
465 if (!d)
466 goto err_out;
467
468 d = debugfs_create_file(
469 "perfmon_events_enable", S_IRUGO, l->debugfs, g,
462 &perfmon_events_enable_fops); 470 &perfmon_events_enable_fops);
463 if (!d) 471 if (!d)
464 goto err_out; 472 goto err_out;
465 473
466 d = debugfs_create_file( 474 d = debugfs_create_file(
467 "perfmon_events_count", S_IRUGO, l->debugfs, g, 475 "perfmon_events_count", S_IRUGO, l->debugfs, g,
468 &perfmon_events_count_fops); 476 &perfmon_events_count_fops);
469 if (!d) 477 if (!d)
470 goto err_out; 478 goto err_out;
471 479 }
472 d = debugfs_create_file(
473 "pmu_security", S_IRUGO, l->debugfs, g,
474 &security_fops);
475 if (!d)
476 goto err_out;
477 return 0; 480 return 0;
478err_out: 481err_out:
479 pr_err("%s: Failed to make debugfs node\n", __func__); 482 pr_err("%s: Failed to make debugfs node\n", __func__);