mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
adsp_dfs: define adspfreq_stats_update conditionally
Define function adspfreq_stats_update only if CONFIG_DEBUG_FS is enabled. Otherwise, this function is unused, which triggers a warning and may be treated as an error. Change-Id: Ia0d6d004dc74ce942db7579810297c469d8ff44f Signed-off-by: Ian Chang <ianc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1610762 (cherry picked from commit ed13d72d6b99b93095600aad0e02aae6eaf44e8c) Reviewed-on: https://git-master.nvidia.com/r/1626906 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@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
Laxman Dewangan
parent
9de7361de1
commit
b3ff5cc423
@@ -253,16 +253,6 @@ static unsigned long adsp_get_target_freq(unsigned long tfreq, int *index)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void adspfreq_stats_update(void)
|
||||
{
|
||||
unsigned long long cur_time;
|
||||
|
||||
cur_time = get_jiffies_64();
|
||||
freq_stats.time_in_state[freq_stats.last_index] += cur_time -
|
||||
freq_stats.last_time;
|
||||
freq_stats.last_time = cur_time;
|
||||
}
|
||||
|
||||
static struct adsp_dfs_policy dfs_policy = {
|
||||
.enable = 1,
|
||||
.clk_name = "adsp_cpu",
|
||||
@@ -593,6 +583,16 @@ exit_out:
|
||||
DEFINE_SIMPLE_ATTRIBUTE(cur_fops, policy_cur_get,
|
||||
policy_cur_set, "%llu\n");
|
||||
|
||||
static void adspfreq_stats_update(void)
|
||||
{
|
||||
unsigned long long cur_time;
|
||||
|
||||
cur_time = get_jiffies_64();
|
||||
freq_stats.time_in_state[freq_stats.last_index] += cur_time -
|
||||
freq_stats.last_time;
|
||||
freq_stats.last_time = cur_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print residency in each freq levels
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user