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] [day] [month] [year] [list]
Date:	Mon, 11 Jun 2012 11:59:21 +0800
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Philip Rakity <philipspatches@...il.com>
Cc:	linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
	Philip Rakity <prakity@...vell.com>
Subject: Re: [PATCH] regulator: pass voltage when calling notifier for change

On Sat, Jun 09, 2012 at 12:39:15PM -0700, Philip Rakity wrote:

> -	trace_regulator_set_voltage_complete(rdev_get_name(rdev), selector);
> +		voltage = _regulator_get_voltage(rdev);
> +		if (voltage >= 0)
> +			_notifier_call_chain(rdev,
> +					REGULATOR_EVENT_VOLTAGE_CHANGE,
> +					(void *)voltage);
> +	}
> +	trace_regulator_set_voltage_complete(rdev_get_name(rdev), ret);

Hrm, I know we discussed this offline but now that I see the actual code
for the full change here I'm a bit worried about the performance impact
from calling get_voltage() again with devices that don't cache the
register map (it'll be negligable for those that do).  Looking a bit at
the context I think probably what we want to do here is directly call
list_voltage() for the selector we've just set so that the driver
doesn't end up going back to the hardware to read the register value.

Another option is to look at the notifier chain to see if there's any
actual users but that seems more complicated and less abstracted.

We definitely do want to pass the voltage out, now that I see this I
seem to remember that the reason we don't is exactly the performance
concern above but that all predates the use of selectors here which
means we should be able to avoid the I/O costs.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ