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

Commit c3013b55 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

msm: krait-regulator: fix up CPU_UP_CANCELED handling



The driver handles CPU_UP_CANCELED as if the core went ONLINE. This
leads to smp call functions on that cpu even when the cpu is offline.
Make CPU_UP_CANCELED force bhs on the target cpu, since it is still
offline.

Change-Id: I668dbfd947d836a1f468d57372e73fbd08dd437e
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 7cf5b7c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1052,6 +1052,7 @@ static int krait_regulator_cpu_callback(struct notifier_block *nfb,
			(int)action, cpu, cpu_online(cpu));
	switch (action & ~CPU_TASKS_FROZEN) {
	case CPU_UP_PREPARE:
	case CPU_UP_CANCELED:
		mutex_lock(&pvreg->krait_power_vregs_lock);
		kvreg->force_bhs = true;
		/*
@@ -1062,7 +1063,6 @@ static int krait_regulator_cpu_callback(struct notifier_block *nfb,
		__switch_to_using_bhs(kvreg);
		mutex_unlock(&pvreg->krait_power_vregs_lock);
		break;
	case CPU_UP_CANCELED:
	case CPU_ONLINE:
		mutex_lock(&pvreg->krait_power_vregs_lock);
		kvreg->force_bhs = false;