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

Commit 23591a05 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Gerrit - the friendly Code Review server
Browse files

core_ctl: Handle only CPU_ONLINE and CPU_DEAD notifications



We are interested in only CPU_ONLINE and CPU_DEAD notifications. Don't
do anything when other notifications arrive.

Change-Id: I326faf82334d7f05c278cfb8dfe6e6aa7aaef06c
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 77a1c447
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -893,10 +893,9 @@ static int __ref cpu_callback(struct notifier_block *nfb,
	struct cpu_data *state = &per_cpu(cpu_state, cpu);
	struct cluster_data *cluster = state->cluster;
	unsigned int need;
	int ret = NOTIFY_OK;

	if (unlikely(!cluster || !cluster->inited))
		return NOTIFY_OK;
		return NOTIFY_DONE;

	switch (action & ~CPU_TASKS_FROZEN) {
	case CPU_ONLINE:
@@ -927,13 +926,15 @@ static int __ref cpu_callback(struct notifier_block *nfb,
		state->busy = 0;
		cluster->active_cpus = get_active_cpu_count(cluster);
		break;
	default:
		return NOTIFY_DONE;
	}

	need = apply_limits(cluster, cluster->need_cpus);
	if (adjustment_possible(cluster, need))
		wake_up_core_ctl_thread(cluster);

	return ret;
	return NOTIFY_OK;
}

static struct notifier_block __refdata cpu_notifier = {