msm-cpufreq: fix cpufreq compile error problem
When enable Qcom-cpufreq driver on 5.4,because some data struct has been changed, and trace_cpu_frequency has been removed, this will cause the compile issue, so fix these problem to pass compile. Change-Id: I71f76b92a52cfd8a905a5fc7fad6e5a5f4e6b39f Signed-off-by: Biao Long <blong@codeaurora.org>
This commit is contained in:
parent
1a5ca59cc3
commit
ae32912529
@ -4,7 +4,7 @@
|
|||||||
* MSM architecture cpufreq driver
|
* MSM architecture cpufreq driver
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 Google, Inc.
|
* Copyright (C) 2007 Google, Inc.
|
||||||
* Copyright (c) 2007-2019, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2007-2020, The Linux Foundation. All rights reserved.
|
||||||
* Author: Mike A. Chan <mikechan@google.com>
|
* Author: Mike A. Chan <mikechan@google.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -49,7 +49,6 @@ static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
|
|||||||
|
|
||||||
freqs.old = policy->cur;
|
freqs.old = policy->cur;
|
||||||
freqs.new = new_freq;
|
freqs.new = new_freq;
|
||||||
freqs.cpu = policy->cpu;
|
|
||||||
|
|
||||||
trace_cpu_frequency_switch_start(freqs.old, freqs.new, policy->cpu);
|
trace_cpu_frequency_switch_start(freqs.old, freqs.new, policy->cpu);
|
||||||
cpufreq_freq_transition_begin(policy, &freqs);
|
cpufreq_freq_transition_begin(policy, &freqs);
|
||||||
@ -123,7 +122,7 @@ static unsigned int msm_cpufreq_resolve_freq(struct cpufreq_policy *policy,
|
|||||||
return freq;
|
return freq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_cpufreq_verify(struct cpufreq_policy *policy)
|
static int msm_cpufreq_verify(struct cpufreq_policy_data *policy)
|
||||||
{
|
{
|
||||||
cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||||
policy->cpuinfo.max_freq);
|
policy->cpuinfo.max_freq);
|
||||||
|
@ -203,6 +203,48 @@ TRACE_EVENT(cpu_frequency_limits,
|
|||||||
(unsigned long)__entry->cpu_id)
|
(unsigned long)__entry->cpu_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(cpu_frequency_switch_start,
|
||||||
|
|
||||||
|
TP_PROTO(unsigned int start_freq, unsigned int end_freq,
|
||||||
|
unsigned int cpu_id),
|
||||||
|
|
||||||
|
TP_ARGS(start_freq, end_freq, cpu_id),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(u32, start_freq)
|
||||||
|
__field(u32, end_freq)
|
||||||
|
__field(u32, cpu_id)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->start_freq = start_freq;
|
||||||
|
__entry->end_freq = end_freq;
|
||||||
|
__entry->cpu_id = cpu_id;
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("start=%lu end=%lu cpu_id=%lu",
|
||||||
|
(unsigned long)__entry->start_freq,
|
||||||
|
(unsigned long)__entry->end_freq,
|
||||||
|
(unsigned long)__entry->cpu_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
TRACE_EVENT(cpu_frequency_switch_end,
|
||||||
|
|
||||||
|
TP_PROTO(unsigned int cpu_id),
|
||||||
|
|
||||||
|
TP_ARGS(cpu_id),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__field(u32, cpu_id)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
__entry->cpu_id = cpu_id;
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
|
||||||
|
);
|
||||||
|
|
||||||
TRACE_EVENT(device_pm_callback_start,
|
TRACE_EVENT(device_pm_callback_start,
|
||||||
|
|
||||||
TP_PROTO(struct device *dev, const char *pm_ops, int event),
|
TP_PROTO(struct device *dev, const char *pm_ops, int event),
|
||||||
|
Loading…
Reference in New Issue
Block a user