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

Commit 4ad24a11 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lpm-levels: Move cpuidle tracepoints within lpm_levels"

parents 34d72591 ba83fb89
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/module.h>
#include <trace/events/power.h>

#include "cpuidle.h"

@@ -144,15 +143,6 @@ int cpuidle_idle_call(void)
		return 0;
	}

	trace_cpu_idle_rcuidle(next_state, dev->cpu);

	if (need_resched()) {
		dev->last_residency = 0;
		local_irq_enable();
		entered_state = next_state;
		goto exit;
	}

	if (drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP)
		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
				   &dev->cpu);
@@ -167,9 +157,6 @@ int cpuidle_idle_call(void)
		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
				   &dev->cpu);

exit:
	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);

	/* give the governor an opportunity to reflect on the outcome */
	if (cpuidle_curr_governor->reflect)
		cpuidle_curr_governor->reflect(dev, entered_state);
+10 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include <asm/arch_timer.h>
#include <asm/cacheflush.h>
#include "lpm-levels.h"

#include <trace/events/power.h>
#define CREATE_TRACE_POINTS
#include <trace/events/trace_msm_low_power.h>

@@ -660,6 +660,13 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
		return -EPERM;
	}

	trace_cpu_idle_rcuidle(idx, dev->cpu);

	if (need_resched()) {
		dev->last_residency = 0;
		goto exit;
	}

	pwr_params = &cluster->cpu->levels[idx].pwr;
	sched_set_cpu_cstate(smp_processor_id(), idx + 1,
		pwr_params->energy_overhead, pwr_params->latency_us);
@@ -681,7 +688,9 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	do_div(time, 1000);
	dev->last_residency = (int)time;

exit:
	local_irq_enable();
	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
	return idx;
}