Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Benjamin Herrenschmidt
On Sun, 2015-12-06 at 14:28 -0600, Rob Herring wrote: > > Do you plan to respin the OF parts at least soon? There's another > problem Guenter found that of_fdt_unflatten_tree is not re-entrant due > to "depth" being static and this series fixes that. So I'd rather > apply this and avoid adding a

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Guenter Roeck
On 12/06/2015 03:54 PM, Benjamin Herrenschmidt wrote: On Sun, 2015-12-06 at 14:28 -0600, Rob Herring wrote: Do you plan to respin the OF parts at least soon? There's another problem Guenter found that of_fdt_unflatten_tree is not re-entrant due to "depth" being static and this series fixes

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Rob Herring
On Sun, Dec 6, 2015 at 8:21 PM, Guenter Roeck wrote: > On 12/06/2015 03:54 PM, Benjamin Herrenschmidt wrote: >> >> On Sun, 2015-12-06 at 14:28 -0600, Rob Herring wrote: >>> >>> >>> Do you plan to respin the OF parts at least soon? There's another >>> problem Guenter found that

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Guenter Roeck
On 12/06/2015 06:33 PM, Rob Herring wrote: On Sun, Dec 6, 2015 at 8:21 PM, Guenter Roeck wrote: On 12/06/2015 03:54 PM, Benjamin Herrenschmidt wrote: On Sun, 2015-12-06 at 14:28 -0600, Rob Herring wrote: Do you plan to respin the OF parts at least soon? There's another

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Rob Herring
+Guenter On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: > In current implementation, unflatten_dt_node() is called recursively > to unflatten device nodes in FDT blob. It's stress to limited stack > capacity. > > This avoids calling the function recursively, meaning

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-12-06 Thread Guenter Roeck
On 12/06/2015 12:28 PM, Rob Herring wrote: +Guenter On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: In current implementation, unflatten_dt_node() is called recursively to unflatten device nodes in FDT blob. It's stress to limited stack capacity. This avoids

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-11-04 Thread Gavin Shan
On Thu, Nov 05, 2015 at 10:23:15AM +1100, Gavin Shan wrote: >On Wed, Nov 04, 2015 at 10:07:50AM -0600, Rob Herring wrote: >>On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: >>> In current implementation, unflatten_dt_node() is called recursively >>> to unflatten device

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-11-04 Thread Gavin Shan
On Wed, Nov 04, 2015 at 10:07:50AM -0600, Rob Herring wrote: >On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: >> In current implementation, unflatten_dt_node() is called recursively >> to unflatten device nodes in FDT blob. It's stress to limited stack >> capacity. >

[PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-11-04 Thread Gavin Shan
In current implementation, unflatten_dt_node() is called recursively to unflatten device nodes in FDT blob. It's stress to limited stack capacity. This avoids calling the function recursively, meaning the device nodes are unflattened in one call on unflatten_dt_node(): two arrays are introduced

Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node()

2015-11-04 Thread Rob Herring
On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: > In current implementation, unflatten_dt_node() is called recursively > to unflatten device nodes in FDT blob. It's stress to limited stack > capacity. Did you actually hit a problem? Now we have a max depth of 64.