mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 04:15:21 +02:00
FROMLIST: time/sched_clock: Export sched_clock_register()
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 <chun-hung.wu@mediatek.com> Signed-off-by: Walter Chang <walter.chang@mediatek.com> Acked-by: John Stultz <jstultz@google.com> Bug: 161675989 Link: https://lore.kernel.org/lkml/20230517022557.24388-2-walter.chang@mediatek.com/ Change-Id: Ib052d1fd7ccf6a7422eb6f1755515e1236285e01 Signed-off-by: Carlos Llamas <cmllamas@google.com>
This commit is contained in:
parent
08901ec9f1
commit
858a548331
|
@ -161,8 +161,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;
|
||||
|
@ -234,6 +233,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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user