Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-13 Thread Benjamin Herrenschmidt
On Thu, 2014-11-13 at 12:44 +, Grant Likely wrote: > On Thu, Nov 13, 2014 at 12:45 AM, Benjamin Herrenschmidt > wrote: > > What about this one instead ? I want to cache it because that function > > can be called quite a while and doing two additional property lookup > > and string compares eve

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-13 Thread Grant Likely
On Thu, Nov 13, 2014 at 12:45 AM, Benjamin Herrenschmidt wrote: > What about this one instead ? I want to cache it because that function > can be called quite a while and doing two additional property lookup > and string compares every time might hurt some platforms. > > > > We have a histori

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Stephen Rothwell
Hi Ben, On Thu, 13 Nov 2014 11:45:22 +1100 Benjamin Herrenschmidt wrote: > > What about this one instead ? I want to cache it because that function > can be called quite a while and doing two additional property lookup > and string compares every time might hurt some platforms. Looks good to me

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Benjamin Herrenschmidt
What about this one instead ? I want to cache it because that function can be called quite a while and doing two additional property lookup and string compares every time might hurt some platforms. We have a historical hack that treats missing ranges properties as the equivalent of an empty

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Benjamin Herrenschmidt
On Thu, 2014-11-13 at 09:10 +1100, Stephen Rothwell wrote: > Hi Ben, > > Urk! :-) > > How about: > > On Wed, 12 Nov 2014 16:51:01 +1100 Benjamin Herrenschmidt > wrote: > > > > diff --git a/drivers/of/address.c b/drivers/of/address.c > > index e371825..e37f017 100644 > > --- a/drivers/of/addre

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Stephen Rothwell
Hi Ben, Urk! :-) How about: On Wed, 12 Nov 2014 16:51:01 +1100 Benjamin Herrenschmidt wrote: > > diff --git a/drivers/of/address.c b/drivers/of/address.c > index e371825..e37f017 100644 > --- a/drivers/of/address.c > +++ b/drivers/of/address.c > @@ -7,6 +7,10 @@ > #include > #include >

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Grant Likely
On Wed, 12 Nov 2014 08:39:32 -0600 , Rob Herring wrote: > On Tue, Nov 11, 2014 at 11:51 PM, Benjamin Herrenschmidt > wrote: > > We have a historical hack that treats missing ranges properties as the > > equivalent of an empty one. This is needed for ancient PowerMac "bad" > > device-trees, and s

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Benjamin Herrenschmidt
On Wed, 2014-11-12 at 08:39 -0600, Rob Herring wrote: > On Tue, Nov 11, 2014 at 11:51 PM, Benjamin Herrenschmidt > wrote: > > We have a historical hack that treats missing ranges properties as the > > equivalent of an empty one. This is needed for ancient PowerMac "bad" > > device-trees, and shoul

Re: [PATCH] of/base: Fix PowerPC address parsing hack

2014-11-12 Thread Rob Herring
On Tue, Nov 11, 2014 at 11:51 PM, Benjamin Herrenschmidt wrote: > We have a historical hack that treats missing ranges properties as the > equivalent of an empty one. This is needed for ancient PowerMac "bad" > device-trees, and shouldn't be enabled for any other PowerPC platform, > otherwise we g

[PATCH] of/base: Fix PowerPC address parsing hack

2014-11-11 Thread Benjamin Herrenschmidt
We have a historical hack that treats missing ranges properties as the equivalent of an empty one. This is needed for ancient PowerMac "bad" device-trees, and shouldn't be enabled for any other PowerPC platform, otherwise we get some nasty layout of devices in sysfs or even duplication when a set o