mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Sivaram Nair <sivaramn@nvidia.com>
Cc: ccross@android.com, santosh.shilimkar@ti.com, khilman@ti.com,
	daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] cpuidle: coupled: fix ready counter decrement
Date: Sat, 15 Dec 2012 00:37:03 +0100	[thread overview]
Message-ID: <4511257.Msp501Wi5G@vostro.rjw.lan> (raw)
In-Reply-To: <1355474528-13094-1-git-send-email-sivaramn@nvidia.com>

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.

  parent reply	other threads:[~2012-12-14 23:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  8:42 Sivaram Nair
2012-12-14 23:34 ` Santosh Shilimkar
2012-12-14 23:37 ` Rafael J. Wysocki [this message]
2012-12-15  1:53   ` Colin Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4511257.Msp501Wi5G@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=ccross@android.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=sivaramn@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®