Skip to content

Commit

Permalink
cpuidle / coupled: fix ready counter decrement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sivaram Nair authored and Rafael J. Wysocki committed Jan 3, 2013
1 parent 0e5537b commit 92638e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpuidle/coupled.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 92638e2

Please sign in to comment.