Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423720

Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared

From Alexandre Courbot <acourbot@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared
Date 2016-06-16 09:00 +0200
Message-ID <rKzrr-4Vy-3@gated-at.bofh.it> (permalink)
References <rKz86-4OM-11@gated-at.bofh.it>
Organization NVIDIA

Show all headers | View raw


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?

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-16 08:40 +0200
  Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Alexandre Courbot <acourbot@nvidia.com> - 2016-06-16 09:00 +0200
    Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-16 09:00 +0200
  Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-16 14:30 +0200
    Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-16 14:50 +0200
      Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-16 15:30 +0200

csiph-web