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

Commit 2373dabe authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

msm: thermal: Online only cores, which are hotplugged by KTM



On thermal hotplug clear event, online only cores which are offlined
by KTM. During a thermal hotplug event, KTM evaluates the thermal
hotplug status of the cpus and hotplugs or brings them up accordingly.
It impacts cases where some cores are not cold boot yet or those cores
are offlined due to non thermal reason.

Change-Id: Ib4073be13c28c444ff6d322432b4ed46e10b1f08
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent fd7cc093
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1860,10 +1860,12 @@ static int __ref update_offline_cores(int val)
{
	uint32_t cpu = 0;
	int ret = 0;
	uint32_t previous_cpus_offlined = 0;

	if (!core_control_enabled)
		return 0;

	previous_cpus_offlined = cpus_offlined;
	cpus_offlined = msm_thermal_info.core_control_mask & val;

	for_each_possible_cpu(cpu) {
@@ -1876,7 +1878,7 @@ static int __ref update_offline_cores(int val)
					cpu, ret);
			else
				pr_debug("Offlined CPU%d\n", cpu);
		} else if (online_core) {
		} else if (online_core && (previous_cpus_offlined & BIT(cpu))) {
			if (cpu_online(cpu))
				continue;
			ret = cpu_up(cpu);