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]
Date:	Thu, 3 Dec 2009 13:22:41 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Daniel Mack <daniel@...aq.de>
Cc:	linux-kernel@...r.kernel.org, Liam Girdwood <lrg@...mlogic.co.uk>,
	Pierre Ossman <pierre@...man.eu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Matt Fleming <matt@...sole-pimps.org>,
	Adrian Hunter <adrian.hunter@...ia.com>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Eric Miao <eric.y.miao@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Cliff Brake <cbrake@...-systems.com>,
	Jarkko Lavinen <jarkko.lavinen@...ia.com>,
	linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mmc: move regulator handling to core

On Thu, Dec 03, 2009 at 02:14:23PM +0100, Daniel Mack wrote:
> On Thu, Dec 03, 2009 at 01:06:27PM +0000, Mark Brown wrote:

> > This is historical, they can all be converted to regulator_get_exclusive()
> > so the move to the core (while good) isn't required for this reason.

> Is it? What if you share one regulator for two slots? While this isn't a
> problem I have met in real life, this should still be considered.

I agree, this is a configuration which I have also seen, but there was a
strong insistence that the power off had to function as expected.  An
approach which allows shared regulators is generally always preferable
since it copes with a wider range of system designs.

> The problem I _did_ see, however, was a warning when the regulator was
> marked as always_on in its constraints. What happens then is that
> regulator_is_enabled() will always return 1, causing the pxamci code to

...

> Making those drivers claim their regulators exclusively _does_ solve the
> first problem, but not the latter.

Yeah, there's currently an assumption that the constraints will be
suitable for the driver there.  A driver that can handle sharing should
always cope here, it's one reason to prefer them.

> > >  	case MMC_POWER_OFF:
> > > -		if(host->vcc &&
> > > -		   regulator_is_enabled(host->vcc))
> > > -			regulator_disable(host->vcc);
> > > +		if(mmc->vcc && mmc->vcc_enabled) {
> > > +			regulator_disable(mmc->vcc);
> > > +			mmc->vcc_enabled = 0;
> > > +		}

> > Can the MMC core actually tolerate the MMC power not getting killed when
> > expected?  My understanding from previous discussion was that it wasn't
> > able to do so.  If it is then conversion to using regulator_get_exclusive()
> > isn't desirable, of course.

> I would expect the power to be killed when the last user stops using it.
> Which should result in the same effect if you only have one host, one
> regulator, and one user.

Yes, it's always fine in that case (modulo always_on and/or regulators
without power control).  This goes back to the thing about using
regulator_get_exclusive(), the message given was that the MMC drivers
really needed to be able to guarantee that the power would be removed
when that was requested.

Like I say, if there isn't a *strict* requirement but it's only
desirable (possibly strongly desirable) then your approach is obviously
preferable.
--
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