[PATCH 01/37] clocksource/drivers/arm_arch_timer: Initialize evtstrm after finalizing cpucaps

Mark Rutland mark.rutland at arm.com
Thu Sep 21 09:27:13 PDT 2023


On Thu, Sep 21, 2023 at 08:41:52AM +0100, Marc Zyngier wrote:
> On Tue, 19 Sep 2023 10:28:14 +0100,
> Mark Rutland <mark.rutland at arm.com> wrote:
> > 
> > We attempt to initialize each CPU's arch_timer event stream in
> > arch_timer_evtstrm_enable(), which we call from the
> > arch_timer_starting_cpu() cpu hotplug callback which is registered early
> > in boot. As this is registered before we initialize the system cpucaps,
> > the test for ARM64_HAS_ECV will always be false for CPUs present at boot
> > time, and will only be taken into account for CPUs onlined late
> > (including those which are hotplugged out and in again).
> > 
> > Due to this, CPUs present and boot time may not use the intended divider
> > and scale factor to generate the event stream, and may differ from other
> > CPUs.
> > 
> > Correct this by only initializing the event stream after cpucaps have been
> > finalized, registering a separate CPU hotplug callback for the event stream
> > configuration. Since the caps must be finalized by this point, use
> > cpus_have_final_cap() to verify this.
> 
> Isn't this the same as 20230907133410.3817800-1-mark.rutland at arm.com?

Yes; sorry -- I had to pull it into this series to avoid a conflict, and I had
meant to note that in the cover and add the acks from you and Thomas here.

I've folded those in now.

Mark.



More information about the linux-arm-kernel mailing list