From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Benoît Monin" <benoit.monin@bootlin.com>
Cc: "Thomas Gleixner" <tglx@kernel.org>,
"Radu Rendec" <radu@rendec.net>,
"Aleksandar Rikalo" <arikalo@gmail.com>,
"Paul Burton" <paulburton@kernel.org>,
"Dragan Mladjenovic" <dragan.mladjenovic@syrmia.com>,
"Chao-ying Fu" <cfu@wavecomp.com>,
"Daniel Lezcano" <daniel.lezcano@kernel.org>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/5] clocksource: mips-gic-timer: Use local counter on synced multi-cluster systems
Date: Wed, 30 Sep 2026 18:21:22 +0200 [thread overview]
Message-ID: <ar03AkCaaYiY5c6h@alpha.franken.de> (raw)
In-Reply-To: <3hJ3aZuPRWSZSVZ0yXJIXA@bootlin.com>
On Wed, Sep 30, 2026 at 05:49:17PM +0200, Benoît Monin wrote:
> On Tuesday, 29 September 2026 at 18:59:16 CEST, Thomas Bogendoerfer wrote:
> > > static int gic_starting_cpu(unsigned int cpu)
> > > {
> > > - /* Ensure the GIC counter is running */
> > > - clear_gic_config(GIC_CONFIG_COUNTSTOP);
> > > + unsigned int cluster = cpu_cluster(&cpu_data[cpu]);
> > > +
> > > + if (read_gic_config() & GIC_CONFIG_COUNTSTOP) {
> > > + clear_gic_config(GIC_CONFIG_COUNTSTOP);
> > > +
> > > + if (cluster && mips_cm_is64 && !gic_clock_unstable)
> > > + gic_sync_counter_64(cluster);
> > > +
> > > + if (gic_synced_cl_map &&
> > > + bitmap_full(gic_synced_cl_map, mips_cps_numclusters()))
> > > + schedule_work(&gic_promote_work);
> >
> > do we really need the workqueue ? As far as I understand
> > sched_clock_register() doesn't use the clocksource mutex, so we should
> > be able to directly call gic_promote() again.
>
> With CONFIG_IRQ_TIME_ACCOUNTING=y, calling sched_clock_register() from the
> CPU hotplug STARTING callback leads to a deadlock. We also need the
> workqueue to call it.
thank you for checking
Reviewed-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2026-09-30 16:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 12:14 [PATCH v4 0/5] MIPS: GIC clocksource/irqchip improvements and fixes for multi-cluster systems Benoît Monin
2026-09-29 12:14 ` [PATCH v4 1/5] irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic() Benoît Monin
2026-09-29 12:14 ` [PATCH v4 2/5] irqchip/mips-gic: Fix recursive acquisition of gic_lock in gic_set_affinity() Benoît Monin
2026-09-29 12:14 ` [PATCH v4 3/5] irqchip/mips-gic: Transfer interrupt mask state across clusters Benoît Monin
2026-09-29 17:00 ` Thomas Bogendoerfer
2026-09-29 12:14 ` [PATCH v4 4/5] clocksource: mips-gic-timer: Simplify gic_next_event() for per-cpu timer Benoît Monin
2026-09-29 12:14 ` [PATCH v4 5/5] clocksource: mips-gic-timer: Use local counter on synced multi-cluster systems Benoît Monin
2026-09-29 16:59 ` Thomas Bogendoerfer
2026-09-30 15:49 ` Benoît Monin
2026-09-30 16:21 ` Thomas Bogendoerfer [this message]
2026-10-02 10:02 ` [PATCH v4 0/5] MIPS: GIC clocksource/irqchip improvements and fixes for " Daniel Lezcano
2026-10-12 14:02 ` Benoît Monin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ar03AkCaaYiY5c6h@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=arikalo@gmail.com \
--cc=benoit.monin@bootlin.com \
--cc=cfu@wavecomp.com \
--cc=daniel.lezcano@kernel.org \
--cc=dragan.mladjenovic@syrmia.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paulburton@kernel.org \
--cc=radu@rendec.net \
--cc=tawfik.bayouk@mobileye.com \
--cc=tglx@kernel.org \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.kondratiev@mobileye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.