[Skiboot] question about sbe-p9 timer
oohall at gmail.com
Thu Feb 13 12:46:32 AEDT 2020
On Thu, Feb 13, 2020 at 3:32 AM Thiago Jung Bauermann
<bauerman at linux.ibm.com> wrote:
> I've been studying the timer code in hw/sbe-p9.c and I have a question
> regarding concurrency: I noticed that in almost all cases,
> sbe_last_gen_stamp is accessed with sbe->lock held (where sbe is the
> default chip).
> Except in one case: p9_sbe_update_timer_expiry() calls
> p9_sbe_timer_schedule() - which reads sbe_last_gen_stamp - without
> acquiring sbe->lock. Is this a problem that needs to be fixed?
The SBE timer state is protected by a separate lock (sbe_timer_lock)
since it's global state and not tied to a specific SBE. When starting
the timer we take the per-SBE lock for the default SBE since we need
to modify its message queue. Seems ok to me.
> Thiago Jung Bauermann
> IBM Linux Technology Center
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
More information about the Skiboot