]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
time/sched_clock: Export symbol for sched_clock register function
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 2 Jun 2025 15:18:51 +0000 (17:18 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Sep 2025 08:52:31 +0000 (10:52 +0200)
The timer drivers could be converted into modules. The different
functions to register the clocksource or the clockevent are already
exporting their symbols for modules but the sched_clock_register()
function is missing.

Export the symbols so the drivers using this function can be converted
into modules.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Will McVicker <willmcvicker@google.com>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/r/20250602151853.1942521-8-daniel.lezcano@linaro.org
kernel/time/sched_clock.c

index cc15fe293719f5c7ca0b2882920f9e4587004827..cc1afec306b3f072758729f5da3af6d37174b795 100644 (file)
@@ -174,8 +174,7 @@ static enum hrtimer_restart sched_clock_poll(struct hrtimer *hrt)
        return HRTIMER_RESTART;
 }
 
-void __init
-sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
+void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
 {
        u64 res, wrap, new_mask, new_epoch, cyc, ns;
        u32 new_mult, new_shift;
@@ -247,6 +246,7 @@ sched_clock_register(u64 (*read)(void), int bits, unsigned long rate)
 
        pr_debug("Registered %pS as sched_clock source\n", read);
 }
+EXPORT_SYMBOL_GPL(sched_clock_register);
 
 void __init generic_sched_clock_init(void)
 {