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

Commit c153dfba authored by Raghavendra Kakarla's avatar Raghavendra Kakarla
Browse files

driver: lpm-levels: Add check for IPI pendning in core lpm path



Add check whether IPI is in pending state for the core while its
entering to LPM.

Change-Id: I6927fd445a1e2e46a4b5329003994a5bd710dc66
Signed-off-by: default avatarRaghavendra Kakarla <rkakarla@codeaurora.org>
parent 33569a19
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1418,6 +1418,7 @@ void update_ipi_history(int cpu)
	if (history->current_ptr >= MAXSAMPLES)
		history->current_ptr = 0;
	history->cpu_idle_resched_ts = now;
	trace_ipi_wakeup_time(ktime_to_us(now));
}
#endif

@@ -1474,7 +1475,7 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	trace_cpu_idle_enter(idx);
	lpm_stats_cpu_enter(idx, start_time);

	if (need_resched())
	if (need_resched() || is_IPI_pending(cpumask_of(dev->cpu)))
		goto exit;

	if (idx == cpu->nlevels - 1)
+17 −0
Original line number Diff line number Diff line
@@ -244,6 +244,23 @@ TRACE_EVENT(cluster_pred_hist,
		__entry->sample, __entry->tmr)
);

TRACE_EVENT(ipi_wakeup_time,

	TP_PROTO(u64 wakeup),

	TP_ARGS(wakeup),

	TP_STRUCT__entry(
		__field(u64, wakeup)
	),

	TP_fast_assign(
		__entry->wakeup = wakeup;
	),

	TP_printk("wakeup:%llu", __entry->wakeup)
);

#endif
#define TRACE_INCLUDE_FILE trace_msm_low_power
#include <trace/define_trace.h>