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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1441186785.3137.2.camel@pengutronix.de>
Date:	Wed, 02 Sep 2015 11:39:45 +0200
From:	Lucas Stach <l.stach@...gutronix.de>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Rafael Wysocki <rjw@...ysocki.net>, linaro-kernel@...ts.linaro.org,
	linux-pm@...r.kernel.org, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] cpufreq: dt: Tolerance applies on both sides of
 target voltage

Am Mittwoch, den 02.09.2015, 14:36 +0530 schrieb Viresh Kumar:
> Tolerance applies on both sides of the target voltage, i.e. both min and
> max sides.

While I'm not really comfortable with the above, it is exactly how OPPv1
and the voltage tolerance property are specified.

Reviewed-by: Lucas Stach <l.stach@...gutronix.de>

> But while checking if a voltage is supported by the regulator
> or not, we haven't taken care of tolerance on the lower side. Fix that.
> 
> Cc: Lucas Stach <l.stach@...gutronix.de>
> Fixes: 045ee45c4ff2 ("cpufreq: cpufreq-dt: disable unsupported OPPs")
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
>  drivers/cpufreq/cpufreq-dt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> index b1131cf89757..3b64c203bf99 100644
> --- a/drivers/cpufreq/cpufreq-dt.c
> +++ b/drivers/cpufreq/cpufreq-dt.c
> @@ -303,7 +303,8 @@ static int cpufreq_init(struct cpufreq_policy *policy)
>  			rcu_read_unlock();
>  
>  			tol_uV = opp_uV * priv->voltage_tolerance / 100;
> -			if (regulator_is_supported_voltage(cpu_reg, opp_uV,
> +			if (regulator_is_supported_voltage(cpu_reg,
> +							   opp_uV - tol_uV,
>  							   opp_uV + tol_uV)) {
>  				if (opp_uV < min_uV)
>  					min_uV = opp_uV;

-- 
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

--
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