2023-04-19 07:55:09

by Walter Chang (張維哲)

[permalink] [raw]
Subject: [PATCH linux-next v3 1/4] time/sched_clock: Export sched_clock_register()

From: Chun-Hung Wu <[email protected]>

clocksource driver may use sched_clock_register()
to resigter itself as a sched_clock source.
Export it to support building such driver
as module, like timer-mediatek.c

Signed-off-by: Chun-Hung Wu <[email protected]>
---
kernel/time/sched_clock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index 8464c5acc913..8e49e87d1221 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -150,8 +150,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;
@@ -223,6 +222,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)
{
--
2.18.0


2023-05-12 03:28:23

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH linux-next v3 1/4] time/sched_clock: Export sched_clock_register()

On Wed, Apr 19, 2023 at 12:49 AM <[email protected]> wrote:
>
> From: Chun-Hung Wu <[email protected]>
>
> clocksource driver may use sched_clock_register()
> to resigter itself as a sched_clock source.
> Export it to support building such driver
> as module, like timer-mediatek.c
>
> Signed-off-by: Chun-Hung Wu <[email protected]>

Sorry for the late reply, I was traveling when I got your mail.

Thanks for your iterations on this series.
I'm ok with these, assuming the folks who maintain the timer-mediatek
driver don't have any more objections.

So for the first three patches:
Acked-by: John Stultz <[email protected]>

thanks
-john