realtek: timer: Register enabled scheduler clock
authorSander Vanheule <sander@svanheule.net>
Fri, 27 Jan 2023 22:35:47 +0000 (23:35 +0100)
committerOlliver Schinagl <oliver@schinagl.nl>
Sat, 28 Jan 2023 14:23:03 +0000 (15:23 +0100)
commit38cba61bff52f22affa66cc764dab2ac158ab7d3
treee5e2517e54f1820fc82e16e8eafd7a545e389de1
parenta63430eac33ceb1dbf96d3667e2a0f2e04ba391f
realtek: timer: Register enabled scheduler clock

Before calling sched_clock_register(), the timer used to drive the
scheduling clock should already be enabled. Otherwise the kernel log
will show strange time jumps during, and the watchdog might not be
pinged in a timely fashion, resulting in reboots.

[    0.160281] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[   78.104319] clocksource: Switched to clocksource realtek_otto_timer

Fixes: 3cc801117118 ("realtek: resurrect timer driver")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c
target/linux/realtek/files-5.15/drivers/clocksource/timer-rtl-otto.c