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: <20150831145249.GO12027@sirena.org.uk>
Date:	Mon, 31 Aug 2015 15:52:49 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Kishon Vijay Abraham I <kishon@...com>
Cc:	Grygorii Strashko <grygorii.strashko@...com>, tony@...mide.com,
	lgirdwood@...il.com, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, nsekhar@...com,
	Tero Kristo <t-kristo@...com>
Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to
 program pbias regulator

On Mon, Aug 31, 2015 at 04:14:07PM +0530, Kishon Vijay Abraham I wrote:
> On Tuesday 25 August 2015 07:20 PM, Mark Brown wrote:
> > On Tue, Aug 25, 2015 at 01:03:04PM +0300, Grygorii Strashko wrote:
> >> On 08/19/2015 09:11 PM, Mark Brown wrote:

> >>> So substract this address from the start of the resource to get the
> >>> offset?  Or provide a wrapper function in the resource code which does
> >>> that.  
> > 
> >> I'd be very appreciated if you have and can share any thought on
> >> How can we get this absolute base address to substract?
> > 
> > Ask the syscon device for its resource?  Or have it provide an absolute
> 
> Even if we get the absolute address of syscon, we have to do the
> subtraction only for the newer dtbs (previous dtbs already have only the
> offset). Do you recommend adding a new property to differentiate between
> older dtbs and newer dtbs? Any other suggestions here?

Hang on.  This is the first I've heard of any DTs not just having
absolute addresses.  How does any of this work - has it ever worked, and
is the situation completely understood?  My original concern with this
was that I coudn't understand the commit log and your original response
seemed to indicate that we always have the absolute address :(  Perhaps
this is something to do with the brief mention of having moved the DT
node for some reason?

We at least need some sort of coherent explanation of the problem and a
comprehensible fix to go with it.  Right now it seems like things are
just being moved about to hide problems without either of these things
which seems like it makes the code less clear and more fragile.

> > address based interface for that matter?

> Syscon doesn't directly expose any API's to write to it's register.
> Rather it uses regmap APIs to read/write to it's register. I'm not sure
> if it's possible to add regmap APIs to write to a register with absolute
> address. Any hints?

Yes, I'm aware that it is regmap based!  What I am suggesting is that if
people are making DTs like yours with devices that are children of the
syscon then presumably it might be useful for it to allow client drivers
to pass absolute addresses in so that it can translate for them.

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