lkml.org 
[lkml]   [2012]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] cpuidle: coupled: fix ready counter decrement
Date
On Friday, December 14, 2012 10:42:08 AM Sivaram Nair wrote:
> 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.

I'm queuing this up for submission as v3.8 material.

I suppose it should be marked for -stable too?

Rafael


> Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
> ---
> drivers/cpuidle/coupled.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c
> index 3265844..2a297f8 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);
>
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2012-12-15 01:21    [W:0.055 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site