Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 464fa626 authored by Matt Wagantall's avatar Matt Wagantall
Browse files

msm: cpufreq: Move cpu_frequency_* trace points from acpuclock to cpufreq



acpuclock is not used on newer targets, so move the trace points
in it up to the generic msm cpufreq driver. Also drop the use of
the 'trace_cpu_frequency' entirely, since it's already present in
generic cpufreq code.

As a side effect of this change, these trace events will no longer
track cpu frequency changes from the power-collapse path. Only
frequency changes coming from cpufreq will be tracked.

CRs-Fixed: 535512
Change-Id: Ib69d92f5d3209a7e36be678997b79bcdac92f953
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 86155e46
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -27,19 +27,10 @@ unsigned long acpuclk_get_rate(int cpu)

int acpuclk_set_rate(int cpu, unsigned long rate, enum setrate_reason reason)
{
	int ret;

	if (!acpuclk_data || !acpuclk_data->set_rate)
		return 0;

	trace_cpu_frequency_switch_start(acpuclk_get_rate(cpu), rate, cpu);
	ret = acpuclk_data->set_rate(cpu, rate, reason);
	if (!ret) {
		trace_cpu_frequency_switch_end(cpu);
		trace_cpu_frequency(rate, cpu);
	}

	return ret;
	return acpuclk_data->set_rate(cpu, rate, reason);
}

uint32_t acpuclk_get_switch_time(void)
+5 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <trace/events/power.h>
#include <mach/socinfo.h>
#include <mach/cpufreq.h>
#include <mach/msm_bus.h>
@@ -163,6 +164,7 @@ static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,

	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);

	trace_cpu_frequency_switch_start(freqs.old, freqs.new, policy->cpu);
	if (is_clk) {
		unsigned long rate = new_freq * 1000;
		rate = clk_round_rate(cpu_clk[policy->cpu], rate);
@@ -175,8 +177,10 @@ static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
		ret = acpuclk_set_rate(policy->cpu, new_freq, SETRATE_CPUFREQ);
	}

	if (!ret)
	if (!ret) {
		trace_cpu_frequency_switch_end(policy->cpu);
		cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
	}

	/* Restore priority after clock ramp-up */
	if (freqs.new > freqs.old && saved_sched_policy >= 0) {