lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 2 Feb 2017 12:22:45 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Markus Mayer <markus.mayer@...adcom.com>,
        Markus Mayer <code@...yer.net>,
        Power Management List <linux-pm@...r.kernel.org>,
        Broadcom Kernel List <bcm-kernel-feedback-list@...adcom.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] cpufreq: brcmstb-avs-cpufreq: properly retrieve
 P-state upon suspend

On Thu, Feb 2, 2017 at 4:33 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 02-02-17, 00:44, Rafael J. Wysocki wrote:
>> On Tuesday, January 31, 2017 10:53:01 AM Markus Mayer wrote:
>> > On 5 January 2017 at 20:11, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>> > > On 19-12-16, 12:10, Markus Mayer wrote:
>> > >> From: Markus Mayer <mmayer@...adcom.com>
>> > >>
>> > >> The AVS GET_PMAP command does return a P-state along with the P-map
>> > >> information. However, that P-state is the initial P-state when the
>> > >> P-map was first downloaded to AVS. It is *not* the current P-state.
>> > >>
>> > >> Therefore, we explicitly retrieve the P-state using the GET_PSTATE
>> > >> command.
>> > >>
>> > >> Signed-off-by: Markus Mayer <mmayer@...adcom.com>
>> > >> ---
>> > >>  drivers/cpufreq/brcmstb-avs-cpufreq.c | 13 ++++++++++++-
>> > >>  1 file changed, 12 insertions(+), 1 deletion(-)
>> > >>
>> > >> diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
>> > >> index 2c6e325..c943606 100644
>> > >> --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
>> > >> +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
>> > >> @@ -784,8 +784,19 @@ static int brcm_avs_target_index(struct cpufreq_policy *policy,
>> > >>  static int brcm_avs_suspend(struct cpufreq_policy *policy)
>> > >>  {
>> > >>       struct private_data *priv = policy->driver_data;
>> > >> +     int ret;
>> > >> +
>> > >> +     ret = brcm_avs_get_pmap(priv, &priv->pmap);
>> > >> +     if (ret)
>> > >> +             return ret;
>> > >>
>> > >> -     return brcm_avs_get_pmap(priv, &priv->pmap);
>> > >> +     /*
>> > >> +      * We can't use the P-state returned by brcm_avs_get_pmap(), since
>> > >> +      * that's the initial P-state from when the P-map was downloaded to the
>> > >> +      * AVS co-processor, not necessarily the P-state we are running at now.
>> > >> +      * So, we get the current P-state explicitly.
>> > >> +      */
>> > >> +     return brcm_avs_get_pstate(priv, &priv->pmap.state);
>> > >>  }
>> > >>
>> > >>  static int brcm_avs_resume(struct cpufreq_policy *policy)
>> > >
>> > > Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
>> >
>> > Just wanted to follow up to see if this has been or will be picked up
>> > for 4.10?
>>
>> For 4.10?  No way.
>
> I also thought it might get into 4.10 as these were fixes. Else he would be
> required to push them via the 4.10 stable kernel.

We'll see.

There are other fixes I may want to push for 4.10 and I can bundle
this thing with them if I decide to send one more pull request for
4.10 after all.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ