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

Commit 7fa077b1 authored by Taniya Das's avatar Taniya Das Committed by Gerrit - the friendly Code Review server
Browse files

cpuidle: lpm-levels: Fix regulator and clock prints in the suspend path



Move the clock/regulator dumps to LPM suspend entry to avoid the
possibility of scheduling while in atomic context as a mutex needs to
be acquired before dumping the enabled clocks list.

Change-Id: Ic3d65d78a3896aa969c759fc45193f3a4e3e772c
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 74809ce2
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -1121,17 +1121,6 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx,
	}

	if (level->notify_rpm) {
		/*
		 * Print the clocks and regulators which are enabled during
		 * system suspend.  This debug information is useful to know
		 * which resources are enabled and preventing the system level
		 * LPMs (XO and Vmin).
		 */
		if (!from_idle) {
			clock_debug_print_enabled();
			regulator_debug_print_enabled();
		}

		cpu = get_next_online_cpu(from_idle);
		cpumask_copy(&cpumask, cpumask_of(cpu));
		clear_predict_history();
@@ -1744,6 +1733,16 @@ static int lpm_suspend_enter(suspend_state_t state)
		pr_err("Failed suspend\n");
		return 0;
	}

	/*
	 * Print the clocks and regulators which are enabled during
	 * system suspend.  This debug information is useful to know
	 * which resources are enabled and preventing the system level
	 * LPMs (XO and Vmin).
	 */
	clock_debug_print_enabled();
	regulator_debug_print_enabled();

	cpu_prepare(lpm_cpu, idx, false);
	cluster_prepare(cluster, cpumask, idx, false, 0);