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, 20 Aug 2015 10:42:52 -0700
From:	Mark Brown <broonie@...nel.org>
To:	Kishon Vijay Abraham I <kishon@...com>
Cc:	tony@...mide.com, lgirdwood@...il.com, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, grygorii.strashko@...com,
	nsekhar@...com, stable@...r.kernel.org,
	Tero Kristo <t-kristo@...com>
Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to
 program pbias regulator

On Thu, Aug 20, 2015 at 11:21:06AM +0530, Kishon Vijay Abraham I wrote:
> On Wednesday 19 August 2015 11:41 PM, Mark Brown wrote:
> > On Tue, Aug 18, 2015 at 11:23:54AM +0530, Kishon Vijay Abraham I wrote:

Please fix your mail client to word wrap within paragraphs.

> >> platform_get_resource can be used if we need the absolute address but here we
> >> need only the offset.

> > So substract this address from the start of the resource to get the

> That would mean from the offset (provided in dt) get the absolute address and
> then again from the absolute address get the offset.

Sure, that's how the Linux APIs work right now and why I'm suggesting
you might want a wrapper.

> > offset?  Or provide a wrapper function in the resource code which does

> Why not use 'of_get_address' which does the same thing? Moreover it's not a
> resource we are dealing with here. It's a resource only for the syscon driver.

This is how the OF description you've done is intended to be parsed and
hence is interpreted by the generic code, it's just a detail of the
syscon implementation that you need to translate it into an offset.

> > that.  What you're saying above is pretty much "this happens to work"
> > but my concern is that the solution that happens to work isn't really
> > what we want to do.

> Not just makes this work, this is also the most reasonable solution available IMHO.

In general moving to a lower level inteface is not usually a step
forward.  As far as I can tell the driver already has all the
information it needs from the more generic APIs, it's just not
interpreting it in the way that the APIs it's trying to use wants.  It
just needs to fix the way it interprets the data it's passing through.

> The most ideal way would have been to use something like what Grygorii
> mentioned to use syscon = <&scm_conf 0xe00> and then use the phandle to get the
> offset. But then with this we'll be breaking older dtbs.

There is no need to break older DTs, that would clearly be a bad idea.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ