Re: [PATCH 1/1] time/sched_clock: move sched_clock_register() out of .init section
From: Thomas Gleixner
Date: Mon Apr 07 2025 - 02:26:21 EST
On Fri, Apr 04 2025 at 08:05, Maxim Kochetkov wrote:
> The sched_clock_register() is widely used by clocksource timer
> drivers. The __init prefix forces them to be initialized using
> macro TIMER_OF_DECLARE with __init prefixed function.
No, it does not. It requires that they are built in, not more.
> Clocksource devices can be consumers of some external irq, clocks,
> resets, e.t.c. Such devices can't be correctly probed if this
> dependencies are provided by platform drivers. Because of regular
> platform devices are not probed at this moment.
>
> We can convert clocksource drivers to platform device drivers to
> fix this issue, but __init prefix in sched_clock_register()
> prevents it.
Again. It does not. What the __init prefix prevents is that the driver
can be built as a module and loaded late.
> So lets drop __init prefix to allow platform device drivers to use
> sched_clock_register().
s/So let's//
"So let's" means nothing.
Also this has nothing to do with platform device drivers. It's all about
modules and nothing else.
Thanks,
tglx