qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/core/clock: always iterate through childs in clock_propag


From: Peter Maydell
Subject: Re: [PATCH] hw/core/clock: always iterate through childs in clock_propagate_period
Date: Fri, 19 Apr 2024 17:24:19 +0100

On Fri, 19 Apr 2024 at 17:09, Raphael Poggi
<raphael.poggi@lynxleap.co.uk> wrote:
>
> Hi Peter,
>
> Le ven. 19 avr. 2024 à 16:08, Peter Maydell <peter.maydell@linaro.org> a 
> écrit :
> >
> > On Thu, 18 Apr 2024 at 21:39, Raphael Poggi
> > <raphael.poggi@lynxleap.co.uk> wrote:
> > > There is an assert "assert(clk->source == NULL);" in clock_propagate().
> > > If I am not wrong, clk->source is set when the clock has a parent.
> >
> > I think that assertion is probably there because we didn't
> > originally have the idea of a clock having a multiplier/divider
> > setting. So the idea was that calling clock_propagate() on a
> > clock with a parent would always be wrong, because the only
> > reason for its period to change would be if the parent had
> > changed, and if the parent changes then clock_propagate()
> > should be called on the parent.
> >
> > We added mul/div later, and we (I) didn't think through all
> > the consequences. If you change the mul/div settings on
> > clockB in this example then you need to call clock_propagate()
> > on it, so we should remove that assert(). Then when you change
> > the mul/div on clockB you can directly clock_propagate(clockB),
> > and I don't think you need this patch at that point.
>
> Alright, that makes sense, is that OK if I send a patch removing the assert ?

Yes, please do.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]