HMP: use per cpu cpuidle driver to fix deadlock in hmp_idle_pull
authorAlex Shi <alex.shi@linaro.org>
Thu, 19 Jun 2014 05:47:35 +0000 (13:47 +0800)
committerJon Medhurst <tixy@linaro.org>
Fri, 27 Jun 2014 09:18:30 +0000 (10:18 +0100)
commit65abdc9b50378783981ed2f3453a0aae090404e4
treea4d9a71b370c2904be7396a11784ae38860f07f8
parent4378062f289e67259f017f6b176ee385dc974836
HMP: use per cpu cpuidle driver to fix deadlock in hmp_idle_pull

Using per cpu cpuidle driver to fix deadlock in hmp_idle_pull.
Otherwise a deadlock happened when do bl_idle_init.

[  113.878664] other info that might help us debug this:
[  113.878667]  Possible unsafe locking scenario:
[  113.878667]
[  113.878670]        CPU0
[  113.878673]        ----
[  113.878681]   lock(cpuidle_driver_lock);
[  113.878684]   <Interrupt>
[  113.878691]     lock(cpuidle_driver_lock);
[  113.878693]
[  113.878693]  *** DEADLOCK ***
[  113.878693]
[  113.878697] 1 lock held by ksoftirqd/4/28:
[  113.878719]  #0:  (hmp_force_migration){+.....}, at: [<c0054da5>]
hmp_idle_pull+0x49/0x508

This patch is just a quick/cheap workaround for cpuidle_driver_lock
deadlock. It works for TC2 and any other platform where the idle
driver cannot be changed at runtime.

Signed-off-by: Alex Shi <alex.shi@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
kernel/sched/fair.c