summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIgor Nabirushkin <inabirushkin@nvidia.com>2019-02-11 05:03:22 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-02-14 09:01:36 -0500
commit76947912e40122cc25f2f3558fc8f59672e154f6 (patch)
treec9005d43184d9c4f544f2520f189585f61b43f0b /include/linux
parent91a2009f5657d27773aa127cd6da7fdd31ea60fe (diff)
tegra-profiler: power_clk: fix possible deadlock
- power_clk: There is a potential deadlock if clk_notifier_unregister() happens during XXXX_notifier_call() callback. Use mutex_trylock() to prevent a possible deadlock. - power_rate samples: Do not send unchanged values. Bug 2491022 Jira DTSP-2248 Change-Id: I53eac956728de88ca645a0ae7ca4e3eb66b2c570 Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2016234 (cherry picked from commit a26746d7350d89a351592cf1d0e7b78996b1c342) Reviewed-on: https://git-master.nvidia.com/r/2018190 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Dmitry Antipov <dantipov@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tegra_profiler.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/tegra_profiler.h b/include/linux/tegra_profiler.h
index 97495c60c..f81812899 100644
--- a/include/linux/tegra_profiler.h
+++ b/include/linux/tegra_profiler.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * include/linux/tegra_profiler.h 2 * include/linux/tegra_profiler.h
3 * 3 *
4 * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2013-2019, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -19,7 +19,7 @@
19 19
20#include <linux/ioctl.h> 20#include <linux/ioctl.h>
21 21
22#define QUADD_SAMPLES_VERSION 45 22#define QUADD_SAMPLES_VERSION 46
23#define QUADD_IO_VERSION 26 23#define QUADD_IO_VERSION 26
24 24
25#define QUADD_IO_VERSION_DYNAMIC_RB 5 25#define QUADD_IO_VERSION_DYNAMIC_RB 5
@@ -72,6 +72,7 @@
72#define QUADD_SAMPLE_VERSION_SAMPLE_ALL_TASKS 43 72#define QUADD_SAMPLE_VERSION_SAMPLE_ALL_TASKS 43
73#define QUADD_SAMPLE_VERSION_KTHREAD_TSK_FLAG 44 73#define QUADD_SAMPLE_VERSION_KTHREAD_TSK_FLAG 44
74#define QUADD_SAMPLE_VERSION_MMAP_CPUID 45 74#define QUADD_SAMPLE_VERSION_MMAP_CPUID 45
75#define QUADD_SAMPLE_VERSION_PCLK_SEND_CHANGES 46
75 76
76#define QUADD_MMAP_HEADER_VERSION 1 77#define QUADD_MMAP_HEADER_VERSION 1
77 78
@@ -283,13 +284,19 @@ struct quadd_ma_data {
283 u32 rss_size; 284 u32 rss_size;
284}; 285};
285 286
287enum {
288 QUADD_POWER_CLK_CPU = 1,
289 QUADD_POWER_CLK_GPU,
290 QUADD_POWER_CLK_EMC,
291};
292
286struct quadd_power_rate_data { 293struct quadd_power_rate_data {
294 u8 type;
287 u64 time; 295 u64 time;
296 u32 cpu_id;
288 297
289 u8 nr_cpus; 298 u16 nr_values;
290 299 u32 flags;
291 u32 gpu;
292 u32 emc;
293}; 300};
294 301
295struct quadd_hotplug_data { 302struct quadd_hotplug_data {