Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-09-17 Thread Sai Prakash Ranjan
On 2019-09-17 21:04, Raul Rangel wrote: On Mon, Aug 26, 2019 at 02:24:14PM -0700, Stephen Boyd wrote: > > ---8<--- > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index c0990703ce54..f42a803fb11a 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -3737,6 +3737,37 @@ static co

Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-09-17 Thread Raul Rangel
On Mon, Aug 26, 2019 at 02:24:14PM -0700, Stephen Boyd wrote: > > > > ---8<--- > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > > index c0990703ce54..f42a803fb11a 100644 > > --- a/drivers/clk/clk.c > > +++ b/drivers/clk/clk.c > > @@ -3737,6 +3737,37 @@ static const struct clk_ops clk_nodrv

Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-08-26 Thread Stephen Boyd
Quoting Stephen Boyd (2019-08-21 11:10:08) > Quoting Stephen Boyd (2019-07-29 15:46:51) > > Quoting Bjorn Andersson (2019-07-22 22:14:46) > > > As clocks are registered their parents are resolved and the parent_map > > > is updated to cache the clk_core objects of each existing parent. > > > But in

Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-08-21 Thread saiprakash . ranjan
Hi Stephen, On 2019-08-21 18:10, Stephen Boyd wrote: Here's an attempt at the simple approach. There's another problem where the cached 'hw' member of the parent data is held around when we don't know when the caller has destroyed it. Not much else we can do for that though. ---8<--- diff --gi

Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-08-21 Thread Stephen Boyd
Quoting Stephen Boyd (2019-07-29 15:46:51) > Quoting Bjorn Andersson (2019-07-22 22:14:46) > > As clocks are registered their parents are resolved and the parent_map > > is updated to cache the clk_core objects of each existing parent. > > But in the event of a clock being unregistered this cache w

Re: [RFC] clk: Remove cached cores in parent map during unregister

2019-07-29 Thread Stephen Boyd
Quoting Bjorn Andersson (2019-07-22 22:14:46) > As clocks are registered their parents are resolved and the parent_map > is updated to cache the clk_core objects of each existing parent. > But in the event of a clock being unregistered this cache will carry > dangling pointers if not invalidated, s

[RFC] clk: Remove cached cores in parent map during unregister

2019-07-22 Thread Bjorn Andersson
As clocks are registered their parents are resolved and the parent_map is updated to cache the clk_core objects of each existing parent. But in the event of a clock being unregistered this cache will carry dangling pointers if not invalidated, so do this for all children of the clock being unregist