Re: [PATCH v2 4/5] clocksource: mips-gic-timer: Set next GIC event on the correct VP

Thomas Gleixner <[email protected]>
Newsgroups org.kernel.vger.linux-mips,org.kernel.vger.linux-kernel
Message-ID <87o6exi3pi.ffs@fw13>
On Mon, Aug 10 2026 at 16:25, Benoît Monin wrote:
> gic_next_event() programs the next event on the clock_event_device's target
> CPU. When that CPU is not the current one, the compare register is reached
> through the GIC VO (other/redirect) window, which is first pointed at the
> target VP with write_gic_vl_other().
>
> On a multi-cluster system each cluster has its own GIC. The VO window of
> the local GIC is what write_gic_vl_other() redirects, so when the target
> CPU belongs to another cluster, write_gic_vo_compare() lands in the
> wrong GIC, overwriting the COMPARE register of a VP in the local cluster.

The MIPS GIC clockevent device is strictly registered per CPU with the
cpumask of that CPU. See gic_clockevent_cpu_init().

The set_next_event() callback of a per CPU clockevent device is _always_
invoked on that CPU and cannot be invoked on a different CPU.

So I completely fail to understand what this cluster and non-current CPU
voodoo is about.

Thanks,

        tglx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.