Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 05:27, Chintan Pandya wrote: > > > On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: > >> +static void of_populate_phandle_cache(void) >> +{ >> +    unsigned long flags; >> +    u32 cache_entries; >> +    struct device_node *np; >> +    u32 phandles = 0; >> + >> +   

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Frank Rowand
On 02/28/18 05:27, Chintan Pandya wrote: > > > On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: > >> +static void of_populate_phandle_cache(void) >> +{ >> +    unsigned long flags; >> +    u32 cache_entries; >> +    struct device_node *np; >> +    u32 phandles = 0; >> + >> +   

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Chintan Pandya
On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: +static void of_populate_phandle_cache(void) +{ + unsigned long flags; + u32 cache_entries; + struct device_node *np; + u32 phandles = 0; + + raw_spin_lock_irqsave(_lock, flags); + + kfree(phandle_cache);

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-28 Thread Chintan Pandya
On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: +static void of_populate_phandle_cache(void) +{ + unsigned long flags; + u32 cache_entries; + struct device_node *np; + u32 phandles = 0; + + raw_spin_lock_irqsave(_lock, flags); + + kfree(phandle_cache);

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Frank Rowand
On 02/16/18 14:20, Frank Rowand wrote: > On 02/16/18 01:04, Chintan Pandya wrote: >> >> >> On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: >>> From: Frank Rowand >>> >>> Create a cache of the nodes that contain a phandle property.  Use this >>> cache to find the node

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Frank Rowand
On 02/16/18 14:20, Frank Rowand wrote: > On 02/16/18 01:04, Chintan Pandya wrote: >> >> >> On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: >>> From: Frank Rowand >>> >>> Create a cache of the nodes that contain a phandle property.  Use this >>> cache to find the node for a given phandle value

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Frank Rowand
On 02/16/18 01:04, Chintan Pandya wrote: > > > On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> Create a cache of the nodes that contain a phandle property.  Use this >> cache to find the node for a given phandle value instead of scanning >>

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Frank Rowand
On 02/16/18 01:04, Chintan Pandya wrote: > > > On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> Create a cache of the nodes that contain a phandle property.  Use this >> cache to find the node for a given phandle value instead of scanning >> the devicetree to find

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Chintan Pandya
On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is

Re: [PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-16 Thread Chintan Pandya
On 2/15/2018 6:22 AM, frowand.l...@gmail.com wrote: From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache,

[PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-14 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will

[PATCH v3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-02-14 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will fall back to the tree