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>
This commit is contained in:
parent
0e5537b30d
commit
92638e2fac
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue