aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorSivaram Nair <sivaramn@nvidia.com>2012-12-18 07:52:54 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-03 07:11:05 -0500
commit92638e2facc5330475c7d558acec77721c3214e4 (patch)
tree121ddcb3c7f9dd13330b5156d385b648c19f35c1 /drivers/cpuidle
parent0e5537b30d3029d784226ab51c2b923d1155b553 (diff)
cpuidle / coupled: fix ready counter decrement
The ready_waiting_counts atomic variable is compared against the wrong online cpu count. The latter is computed incorrectly using logical-OR instead of bit-OR. This patch fixes that. Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Colin Cross <ccross@android.com> Cc: <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/coupled.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c
index 3265844839bf..2a297f86dbad 100644
--- a/drivers/cpuidle/coupled.c
+++ b/drivers/cpuidle/coupled.c
@@ -209,7 +209,7 @@ inline int cpuidle_coupled_set_not_ready(struct cpuidle_coupled *coupled)
209 int all; 209 int all;
210 int ret; 210 int ret;
211 211
212 all = coupled->online_count || (coupled->online_count << WAITING_BITS); 212 all = coupled->online_count | (coupled->online_count << WAITING_BITS);
213 ret = atomic_add_unless(&coupled->ready_waiting_counts, 213 ret = atomic_add_unless(&coupled->ready_waiting_counts,
214 -MAX_WAITING_CPUS, all); 214 -MAX_WAITING_CPUS, all);
215 215