mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
nvgpu: vgpu: no debugfs entries that rely on PMU
When virtualized, the guest OS has no direct access to PMU functionality so don't create debugfs entries that rely on PMU access Bug 200543218 Change-Id: I12730b600802448a240f3de042760041d3ae7d29 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2213650 (cherry picked from commit 053131ef44252748aecaad11ba8dc54f1dc40fce) Reviewed-on: https://git-master.nvidia.com/r/2215162 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Luis Dib <ldib@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
56f8e5b878
commit
bb1b3218c6
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
|
* Copyright (C) 2017-2019 NVIDIA Corporation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This software is licensed under the terms of the GNU General Public
|
* This software is licensed under the terms of the GNU General Public
|
||||||
* License version 2, as published by the Free Software Foundation, and
|
* License version 2, as published by the Free Software Foundation, and
|
||||||
@@ -451,29 +451,32 @@ int gk20a_pmu_debugfs_init(struct gk20a *g)
|
|||||||
if (!d)
|
if (!d)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
||||||
d = debugfs_create_file(
|
|
||||||
"falc_trace", S_IRUGO, l->debugfs, g,
|
|
||||||
&falc_trace_fops);
|
|
||||||
if (!d)
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
d = debugfs_create_file(
|
|
||||||
"perfmon_events_enable", S_IRUGO, l->debugfs, g,
|
|
||||||
&perfmon_events_enable_fops);
|
|
||||||
if (!d)
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
d = debugfs_create_file(
|
|
||||||
"perfmon_events_count", S_IRUGO, l->debugfs, g,
|
|
||||||
&perfmon_events_count_fops);
|
|
||||||
if (!d)
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
d = debugfs_create_file(
|
d = debugfs_create_file(
|
||||||
"pmu_security", S_IRUGO, l->debugfs, g,
|
"pmu_security", S_IRUGO, l->debugfs, g,
|
||||||
&security_fops);
|
&security_fops);
|
||||||
if (!d)
|
if (!d)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
||||||
|
/* No access to PMU if virtual */
|
||||||
|
if (!g->is_virtual) {
|
||||||
|
d = debugfs_create_file(
|
||||||
|
"falc_trace", S_IRUGO, l->debugfs, g,
|
||||||
|
&falc_trace_fops);
|
||||||
|
if (!d)
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
|
d = debugfs_create_file(
|
||||||
|
"perfmon_events_enable", S_IRUGO, l->debugfs, g,
|
||||||
|
&perfmon_events_enable_fops);
|
||||||
|
if (!d)
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
|
d = debugfs_create_file(
|
||||||
|
"perfmon_events_count", S_IRUGO, l->debugfs, g,
|
||||||
|
&perfmon_events_count_fops);
|
||||||
|
if (!d)
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
err_out:
|
err_out:
|
||||||
pr_err("%s: Failed to make debugfs node\n", __func__);
|
pr_err("%s: Failed to make debugfs node\n", __func__);
|
||||||
|
|||||||
Reference in New Issue
Block a user