linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, gnurou@gmail.com,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared
Date: Thu, 16 Jun 2016 12:27:03 +0530	[thread overview]
Message-ID: <20160616065703.GB5726@vireshk-i7> (raw)
In-Reply-To: <dfe1db09-8361-ebc8-063a-c8e0393ceedc@nvidia.com>

On 16-06-16, 15:55, Alexandre Courbot wrote:
> On 06/16/2016 03:33 PM, Viresh Kumar wrote:
> >dev_pm_opp_get_sharing_cpus() returns 0 even in the case where the OPP
> >core doesn't know if the table is shared or not. It is working for most
> >of the platforms, as the OPP table was never created and we returned
> >-ENODEV then.
> >
> >But in case of one of the platforms (Jetson TK1) at least, the situation
> >is a bit different. The OPP table is created (somehow) before
> >dev_pm_opp_get_sharing_cpus() is called and so we returned 0. The caller
> >of this routine treated that as 'CPUs don't share OPPs' and that had bad
> >consequences on performance.
> >
> >Fix this by converting 'shared_opp' to an integer and have an extra
> >value when its state in undefined. dev_pm_opp_get_sharing_cpus() returns
> >-EINVAL now in that case, so that the caller can handle it accordingly
> >(cpufreq-dt considers that as 'all CPUs share the table').
> >
> >Fixes: 6f707daa3833 ("PM / OPP: Add dev_pm_opp_get_sharing_cpus()")
> >Reported-by: Alexandre Courbot <acourbot@nvidia.com>
> >Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> >---
> >Hi Alexandre,
> >
> >This is untested, can you please confirm if this fixes it for you?
> 
> Yep, with this cpufreq_init() takes the fallback path and cpufreq behaves as
> expected thereafter.
> 
> Thanks for reacting so quickly! Can this go into 4.7 fixes?

This will :)

> Tested-by: Alexandre Courbot <acourbot@nvidia.com>

Thanks.

-- 
viresh

  reply	other threads:[~2016-06-16  6:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  6:33 [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Viresh Kumar
2016-06-16  6:55 ` Alexandre Courbot
2016-06-16  6:57   ` Viresh Kumar [this message]
2016-06-16 12:25 ` Rafael J. Wysocki
2016-06-16 12:48   ` Viresh Kumar
2016-06-16 13:26     ` 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=20160616065703.GB5726@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=gnurou@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.org \
    --cc=vireshk@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).