ANDROID: cpufreq: Add a restricted vendor hook for freq transition
A restricted vendor hook for cpufreq transition. The hook is
invoked per policy after changing the policy->cur and passes
policy as an argument.
This reverts commit 171ace325c which is a
revert of the original change. Hence, this brings back the original
change.
Bug: 181889516
Change-Id: I6f89850779fdd63e178e227c293f42b7f66fd78d
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Sai Harshini Nimmala <quic_snimmala@quicinc.com>
(cherry picked from commit 8820ccfe91a92c919231239363fca724f0776ffc)
This commit is contained in:
committed by
Treehugger Robot
parent
7bd5a3d5c1
commit
3259c6dcd9
@@ -85,6 +85,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_allow_domain_state);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_enter);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpuidle_psci_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpufreq_transition);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_balance_anon_file_reclaim);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_show_max_freq);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_selinux_avc_insert);
|
||||
|
||||
@@ -397,6 +397,7 @@ static void cpufreq_notify_transition(struct cpufreq_policy *policy,
|
||||
cpufreq_stats_record_transition(policy, freqs->new);
|
||||
cpufreq_times_record_transition(policy, freqs->new);
|
||||
policy->cur = freqs->new;
|
||||
trace_android_rvh_cpufreq_transition(policy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2195,6 +2196,7 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
|
||||
arch_set_freq_scale(policy->related_cpus, freq,
|
||||
arch_scale_freq_ref(policy->cpu));
|
||||
cpufreq_stats_record_transition(policy, freq);
|
||||
trace_android_rvh_cpufreq_transition(policy);
|
||||
|
||||
if (trace_cpu_frequency_enabled()) {
|
||||
for_each_cpu(cpu, policy->cpus)
|
||||
|
||||
@@ -39,6 +39,10 @@ DECLARE_HOOK(android_vh_cpufreq_target,
|
||||
unsigned int old_target_freq),
|
||||
TP_ARGS(policy, target_freq, old_target_freq));
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_cpufreq_transition,
|
||||
TP_PROTO(struct cpufreq_policy *policy),
|
||||
TP_ARGS(policy), 1);
|
||||
|
||||
#endif /* _TRACE_HOOK_CPUFREQ_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
Reference in New Issue
Block a user