From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
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 09:28:30 -0700 [thread overview]
Message-ID: <1461601710.8946.209.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0hnf32+012i9tDskFNrHzEeJgGp+e00rGHH17ooN5qSPw@mail.gmail.com>
On Mon, 2016-04-25 at 15:48 +0200, Rafael J. Wysocki wrote:
> 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?
>
This impact the display of turbo_pct in Intel P-state sysfs. So if not
too late, I prefer for v4.6.
> Do we want it in -stable too and in what -stable if so?
4.4 onward.
>
Thanks,
Srinivas
>
> >
> > ---
> > 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);
> > --
next prev parent reply other threads:[~2016-04-25 16:28 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
2016-04-25 16:28 ` Srinivas Pandruvada [this message]
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=1461601710.8946.209.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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