Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1244688
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active |
| Date | 2015-10-12 15:30 +0200 |
| Message-ID | <qiLkR-cI-1@gated-at.bofh.it> (permalink) |
| References | <qfctk-1MB-17@gated-at.bofh.it> <qh0R5-3eS-21@gated-at.bofh.it> <qhfGq-7Lv-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/10/15 10:23, Jon Medhurst (Tixy) wrote:
[...]
> diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
> index f1e42f8..59115a4 100644
> --- a/drivers/cpufreq/arm_big_little.c
> +++ b/drivers/cpufreq/arm_big_little.c
> @@ -149,6 +149,18 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
> __func__, cpu, old_cluster, new_cluster, new_rate);
>
> ret = clk_set_rate(clk[new_cluster], new_rate * 1000);
> + if (!ret) {
> + /*
> + * FIXME: clk_set_rate has to handle the case where clk_change_rate
> + * can fail due to hardware or firmware issues. Until the clk core
> + * layer is fixed, we can check here. In most of the cases we will
> + * be reading only the cached value anyway. This needs to be removed
> + * once clk core is fixed.
> + */
> + if (clk_get_rate(clk[new_cluster]) != new_rate * 1000)
> + ret = -EIO;
> + }
> +
> if (WARN_ON(ret)) {
> pr_err("clk_set_rate failed: %d, new cluster: %d\n", ret,
> new_cluster);
> @@ -189,15 +201,6 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
> mutex_unlock(&cluster_lock[old_cluster]);
> }
>
> - /*
> - * FIXME: clk_set_rate has to handle the case where clk_change_rate
> - * can fail due to hardware or firmware issues. Until the clk core
> - * layer is fixed, we can check here. In most of the cases we will
> - * be reading only the cached value anyway. This needs to be removed
> - * once clk core is fixed.
> - */
> - if (bL_cpufreq_get_rate(cpu) != new_rate)
> - return -EIO;
> return 0;
> }
>
>
>
>
The above change looks good to me but with minor nit. You can get rid of
if(!ret) check if you move the hunk after if (WARN_ON(ret))
--
Regards, Sudeep
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-07 19:40 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-08 11:30 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-08 13:30 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-08 15:00 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-08 16:00 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Sudeep Holla <sudeep.holla@foss.arm.com> - 2015-10-08 16:20 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-12 15:30 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-13 09:20 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-13 12:40 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active "Jon Medhurst (Tixy)" <tixy@linaro.org> - 2015-10-14 09:20 +0200
Re: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Sudeep Holla <sudeep.holla@arm.com> - 2015-10-14 10:50 +0200
csiph-web