From: Sivaram Nair Date: Tue, 18 Dec 2012 12:52:54 +0000 (+0100) Subject: cpuidle / coupled: fix ready counter decrement X-Git-Tag: MMI-PSA29.97-13-9~15217^2~3^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92638e2facc5330475c7d558acec77721c3214e4;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Santosh Shilimkar Acked-by: Colin Cross Cc: Signed-off-by: Rafael J. Wysocki --- 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) int all; int ret; - all = coupled->online_count || (coupled->online_count << WAITING_BITS); + all = coupled->online_count | (coupled->online_count << WAITING_BITS); ret = atomic_add_unless(&coupled->ready_waiting_counts, -MAX_WAITING_CPUS, all);