From: "Benoît Monin" <benoit.monin@bootlin.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Daniel Lezcano" <daniel.lezcano@kernel.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Dragan Mladjenovic" <dragan.mladjenovic@syrmia.com>,
"Chao-ying Fu" <cfu@wavecomp.com>,
"Aleksandar Rikalo" <arikalo@gmail.com>,
"Paul Burton" <paulburton@kernel.org>,
"Radu Rendec" <radu@rendec.net>,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Tawfik Bayouk" <tawfik.bayouk@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 v3 5/5] clocksource: mips-gic-timer: Use local counter on synced multi-cluster systems
Date: Mon, 28 Sep 2026 16:56:56 +0200 [thread overview]
Message-ID: <VWJi1WtNRXGGDz_FRKyR5Q@bootlin.com> (raw)
In-Reply-To: <arpA1BHikxF0Zrlb@alpha.franken.de>
On Monday, 28 September 2026 at 12:26:28 CEST, Thomas Bogendoerfer wrote:
> > [...]
> > +static void gic_clocksource_promote(struct work_struct *work)
> > +{
> > + if (gic_clock_unstable || gic_clocksource.read == &gic_hpt_read)
> > + return;
> > +
> > + if (clocksource_unregister(&gic_clocksource) < 0)
> > + return;
> > +
> > + gic_clocksource.read = &gic_hpt_read;
> > +#ifdef CONFIG_GENERIC_GETTIMEOFDAY
> > + gic_clocksource.vdso_clock_mode = VDSO_CLOCKMODE_GIC;
> > +#endif
> > +
> > + if (clocksource_register_hz(&gic_clocksource, gic_frequency) < 0)
> > + return;
> > +
> > + if (mips_cm_revision() >= CM_REV_CM3 || !IS_ENABLED(CONFIG_CPU_FREQ)) {
> > + sched_clock_register(mips_cm_is64 ?
> > + gic_read_count_64 : gic_read_count_2x32,
> > + gic_count_width, gic_frequency);
> > + }
>
> this feels like a lot of work for just replacing the read method.
>
> Why not introduce a flag in gic_hpt_read(), which indicates whether
> it can read the counter directly or need to do it via
> gpt_hpt_read_multicluster() ?
Yes, this way I can avoid the clocksource_unregister()/register(). I'll do
that.
Best regards,
--
Benoît Monin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-09-28 14:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 12:46 [PATCH v3 0/5] MIPS: GIC clocksource/irqchip improvements and fixes for multi-cluster systems Benoît Monin
2026-09-07 12:46 ` [PATCH v3 1/5] irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic() Benoît Monin
2026-09-28 8:17 ` Thomas Bogendoerfer
2026-09-07 12:46 ` [PATCH v3 2/5] irqchip/mips-gic: Fix recursive acquisition of gic_lock in gic_set_affinity() Benoît Monin
2026-09-28 8:22 ` Thomas Bogendoerfer
2026-09-07 12:46 ` [PATCH v3 3/5] irqchip/mips-gic: Enable interrupt when moving affinity across clusters Benoît Monin
2026-09-28 8:35 ` Thomas Bogendoerfer
2026-09-28 13:21 ` Benoît Monin
2026-09-07 12:46 ` [PATCH v3 4/5] clocksource: mips-gic-timer: Simplify gic_next_event() for per-cpu timer Benoît Monin
2026-09-28 9:29 ` Thomas Bogendoerfer
2026-09-07 12:46 ` [PATCH v3 5/5] clocksource: mips-gic-timer: Use local counter on synced multi-cluster systems Benoît Monin
2026-09-28 10:26 ` Thomas Bogendoerfer
2026-09-28 14:56 ` Benoît Monin [this message]
2026-09-19 21:26 ` [PATCH v3 0/5] MIPS: GIC clocksource/irqchip improvements and fixes for " Thomas Gleixner
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=VWJi1WtNRXGGDz_FRKyR5Q@bootlin.com \
--to=benoit.monin@bootlin.com \
--cc=arikalo@gmail.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=tsbogend@alpha.franken.de \
--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.