void cpuidle_profile_finish(int cpu, int early_wakeup)
{
	struct cpuidle_profile_info *info;
	int state;
	ktime_t now;

	if (!profile_ongoing)
		return;

	info = &per_cpu(profile_info, cpu);
	state = info->cur_state;

	if (early_wakeup) {
		count_earlywakeup(info, state);

		/*
		 * If cpu cannot enter power mode, residency time
		 * should not be updated.
		 */
		return;
	}

	now = ktime_get();
	update_time(info, state, now);
}
static void lpm_earlywakeup(void)
{
	count_earlywakeup(&lpm_info, lpm_info.cur_state);
}
static void cpd_earlywakeup(int cpu)
{
	count_earlywakeup(&cpd_info[to_cluster(cpu)], 0);
}
static void lpc_earlywakeup(void)
{
	count_earlywakeup(&lpc_info, 0);
}