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

Commit 2e798855 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Gerrit - the friendly Code Review server
Browse files

coresight: fix the mutex deadlock issue in cpu hotplug notify path



The CPU hotplug notification path is called up by holding the
cpu_add_remove_lock and when the same is held by the
unregister_hotcpu_notifier() in the notifier path results in deadlock.
So,remove the unregister_hotcpu_notifier() from the notification path as
also the presence of qdss etm notifier doesn't cause any overhead.

Change-Id: I97f150fa053e4e5f58c8cad7cdf2d8ae97a3f774
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 323ea2db
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -3482,14 +3482,6 @@ static int etm_cpu_callback(struct notifier_block *nfb, unsigned long action,
out:
	return NOTIFY_OK;
err1:
	if (--count == 0) {
		/* Release the cpu_add_remove_lock */
		cpu_maps_update_done();
		unregister_hotcpu_notifier(&etm_cpu_notifier);
		unregister_hotcpu_notifier(&etm_cpu_dying_notifier);
		/* Set to the original state of lock */
		cpu_maps_update_begin();
	}
	if (clk_disable[cpu]) {
		clk_disable_unprepare(etmdrvdata[cpu]->clk);
		clk_disable[cpu] = false;