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


Groups > linux.kernel > #1252640

Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL switcher is active

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL switcher is active
Date 2015-10-21 12:00 +0200
Message-ID <qlYlA-7Jz-13@gated-at.bofh.it> (permalink)
References <qlYlA-7Jz-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 21-10-15, 10:55, Jon Medhurst (Tixy) wrote:
> The check for correct frequency being set in bL_cpufreq_set_rate is
> broken when the big.LITTLE switcher is active, for two reasons.
> 
> 1. The 'new_rate' variable gets overwritten before the test by the
> code calculating the frequency of the old cluster.
> 
> 2. The frequency returned by bL_cpufreq_get_rate will be the virtual
> frequency, not the actual one the intended version of new_rate contains.
> 
> This means the function always returns an error causing an endless
> stream of: "cpufreq: __target_index: Failed to change cpu frequency: -5"
> 
> As the intent is to check for errors that clk_set_rate doesn't report
> lets move the check to immediately after that and directly use
> clk_get_rate, rather than the arm_big_little helpers which only confuse
> matters. Also, update the comment to be hopefully clearer about the
> purpose of the code.
> 
> Fixes: 0a95e630b49a ("cpufreq: arm_big_little: check if the frequency is set correctly")
> 
> Signed-off-by: Jon Medhurst <tixy@linaro.org>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
> 
> Changes since V1:
> - Check rate using clk_get_rate rather than disabling check when bL
>   switcher active
> 
> Sudeep, I added your Ack from the last comment on the previous patch.
> This final patch differs from what was discussed only in the commit
> message and in source comment which is hopefully more clear and is
> also satisfactory.
> 
> I've also added Michael Turquette's correct email to the CC this time,
> rather than his old Linaro address which was bouncing.
> 
>  drivers/cpufreq/arm_big_little.c | 22 +++++++++++++---------
>  1 file changed, 13 insertions(+), 9 deletions(-)
> 

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH v2] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-21 12:00 +0200
  Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL  switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-21 12:00 +0200
    Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL  switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-30 11:50 +0100
      Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL switcher is active "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-31 03:10 +0100
  Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL switcher  is active Michael Turquette <mturquette@baylibre.com> - 2015-10-26 13:50 +0100

csiph-web