mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ANDROID: DEBUG: cpufreq: fix cpu_capacity tracing build for non-smp systems
cpu curr capacity can only be traced for SMP systems. Non-SMP builds
will fail with:
drivers/cpufreq/cpufreq.c: In function ‘cpufreq_freq_transition_begin’:
drivers/cpufreq/cpufreq.c:438:22: error: implicit declaration of function ‘capacity_curr_of’ [-Werror=implicit-function-declaration]
trace_cpu_capacity(capacity_curr_of(cpu), cpu);
^
Change-Id: I48f870a5691d1afee5b60c3df3024cd8fb439516
Fixes: ("DEBUG: sched,cpufreq: add cpu_capacity change tracepoint")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
committed by
Dmitry Shmidt
parent
61100bdefb
commit
8aab20cfdc
@@ -29,7 +29,9 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/tick.h>
|
||||
#ifdef CONFIG_SMP
|
||||
#include <linux/sched.h>
|
||||
#endif
|
||||
#include <trace/events/power.h>
|
||||
|
||||
static LIST_HEAD(cpufreq_policy_list);
|
||||
@@ -429,7 +431,9 @@ static void cpufreq_notify_post_transition(struct cpufreq_policy *policy,
|
||||
void cpufreq_freq_transition_begin(struct cpufreq_policy *policy,
|
||||
struct cpufreq_freqs *freqs)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
int cpu;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Catch double invocations of _begin() which lead to self-deadlock.
|
||||
@@ -458,8 +462,10 @@ wait:
|
||||
spin_unlock(&policy->transition_lock);
|
||||
|
||||
scale_freq_capacity(policy, freqs);
|
||||
#ifdef CONFIG_SMP
|
||||
for_each_cpu(cpu, policy->cpus)
|
||||
trace_cpu_capacity(capacity_curr_of(cpu), cpu);
|
||||
#endif
|
||||
|
||||
cpufreq_notify_transition(policy, freqs, CPUFREQ_PRECHANGE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user