]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: coupled: abort idle if pokes are pending
authorColin Cross <ccross@android.com>
Thu, 29 Aug 2013 01:41:47 +0000 (18:41 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 29 Aug 2013 20:15:04 +0000 (22:15 +0200)
commit9485f4e1a3b9a2b5e9a111084916303058370553
tree39b917dc5651fe3dfeeb96d6a215ccaa6e73a292
parentda2904dfddbfbec04be6d5f703b79151f6025337
cpuidle: coupled: abort idle if pokes are pending

Joseph Lo <josephl@nvidia.com> reported a lockup on Tegra20 caused
by a race condition in coupled cpuidle.  When two or more cpus
enter idle at the same time, the first cpus to arrive may go to the
ready loop without processing pending pokes from the last cpu to
arrive.

This patch adds a check for pending pokes once all cpus have been
synchronized in the ready loop and resets the coupled state and
retries if any cpus failed to handle their pending poke.

Retrying on all cpus may trigger the same issue again, so this patch
also adds a check to ensure that each cpu has received at least one
poke between when it enters the waiting loop and when it moves on to
the ready loop.

Reported-and-tested-by: Joseph Lo <josephl@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Colin Cross <ccross@android.com>
Cc: 3.6+ <stable@vger.kernel.org> # 3.6+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/coupled.c