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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 May 2014 15:39:00 +0530
From:	Thomas Abraham <ta.omasab@...il.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	"rjw@...ysocki.net" <rjw@...ysocki.net>,
	linaro-kernel@...ts.linaro.org, swarren@...dia.com,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	pdeschrijver@...dia.com, swarren@...dotorg.org,
	linux-kernel@...r.kernel.org,
	Doug Anderson <dianders@...omium.org>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	linux@....linux.org.uk, arvind.chauhan@....com
Subject: Re: [PATCH V2 0/3] cpufreq: add support for intermediate (stable)

On Fri, May 16, 2014 at 2:33 PM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> Douglas Anderson, recently pointed out an interesting problem due to which
> udelay() was expiring earlier than it should.
>
> While transitioning between frequencies few platforms may temporarily switch to
> a stable frequency, waiting for the main PLL to stabilize.
>
> For example: When we transition between very low frequencies on exynos, like
> between 200MHz and 300MHz, we may temporarily switch to a PLL running at 800MHz.
> No CPUFREQ notification is sent for that. That means there's a period of time
> when we're running at 800MHz but loops_per_jiffy is calibrated at between 200MHz
> and 300MHz. And so udelay behaves badly.

Hi Viresh,

In the given example above, the reworked implementation of cpufreq for
exynos maintains the transition frequency at 800MHz / 4 = 200MHz by
using a clock divider. So the transition frequency is ensured to be
less than or equal to the pre-transition cpu clock frequency.

Thanks,
Thomas.

>
> To get this fixed in a generic way, lets introduce another set of callbacks
> get_intermediate() and target_intermediate(), only for drivers with
> target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.
>
> get_intermediate should return a stable intermediate frequency platform wants to
> switch to, and target_intermediate() should set CPU to to that frequency, before
> jumping to the frequency corresponding to 'index'. Core will take care of
> sending notifications and driver doesn't have to handle them in
> target_intermediate() or target_index().
>
> This patchset also update Tegra to use this new infrastructure.
>
> NOTE: Once set to intermediate frequency, driver isn't expected to fail for the
> following ->target_index() call, if it fails core will issue a WARN().
>
> @Stephen: Can you please test this? I haven't as I didn't had a board. :)
>
> V1-V2: Almost changed completely, V1 was here: https://lkml.org/lkml/2014/5/15/40
>
> Viresh Kumar (3):
>   cpufreq: handle calls to ->target_index() in separate routine
>   cpufreq: add support for intermediate (stable) frequencies
>   cpufreq: Tegra: implement intermediate frequency callbacks
>
>  Documentation/cpu-freq/cpu-drivers.txt | 19 +++++++-
>  drivers/cpufreq/cpufreq.c              | 82 ++++++++++++++++++++++++----------
>  drivers/cpufreq/tegra-cpufreq.c        | 81 ++++++++++++++++-----------------
>  include/linux/cpufreq.h                | 15 +++++++
>  4 files changed, 128 insertions(+), 69 deletions(-)
>
> --
> 2.0.0.rc2
>
>
> _______________________________________________
> linaro-kernel mailing list
> linaro-kernel@...ts.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ