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 b...@kernel.crashing.org 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.

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 b...@kernel.crashing.org 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

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 b...@kernel.crashing.org 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

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 b...@kernel.crashing.org 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

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 b...@kernel.crashing.org wrote: diff --git a/drivers/of/address.c b/drivers/of/address.c index e371825..e37f017 100644 ---

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 Stephen Rothwell
Hi Ben, On Thu, 13 Nov 2014 11:45:22 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org 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

[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 of