All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: intel_pstate: Fix processing for turbo activation ratio
Date: Mon, 25 Apr 2016 15:48:38 +0200	[thread overview]
Message-ID: <CAJZ5v0hnf32+012i9tDskFNrHzEeJgGp+e00rGHH17ooN5qSPw@mail.gmail.com> (raw)
In-Reply-To: <1461380039-13804-1-git-send-email-srinivas.pandruvada@linux.intel.com>

On Sat, Apr 23, 2016 at 4:53 AM, Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
> When the config TDP level is not nominal (level = 0), the MSR values for
> reading level 1 and level 2 ratios contain power in low 14 bits and actual
> ratio bits are at bits [23:16]. The current processing for level 1 and
> level 2 is wrong as there is no shift done to get actual ratio.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Since this is a fix, do we need it in v4.6?

Do we want it in -stable too and in what -stable if so?


> ---
>  drivers/cpufreq/intel_pstate.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 1b2767d..03f94c2 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -813,6 +813,10 @@ static int core_get_max_pstate(void)
>                         if (err)
>                                 goto skip_tar;
>
> +                       /* For level 1 and 2, bits[23:16] contains ratio */
> +                       if (tdp_ctrl)
> +                               tdp_ratio >>= 16;
> +                       tdp_ratio &= 0xff; /* ratios are only 8 bits long */
>                         if (tdp_ratio - 1 == tar) {
>                                 max_pstate = tar;
>                                 pr_debug("max_pstate=TAC %x\n", max_pstate);
> --

  reply	other threads:[~2016-04-25 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23  2:53 [PATCH] cpufreq: intel_pstate: Fix processing for turbo activation ratio Srinivas Pandruvada
2016-04-25 13:48 ` Rafael J. Wysocki [this message]
2016-04-25 16:28   ` Srinivas Pandruvada
2016-04-25 21:44     ` Rafael J. Wysocki

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=CAJZ5v0hnf32+012i9tDskFNrHzEeJgGp+e00rGHH17ooN5qSPw@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.