We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b9bafd + b893a0b commit 0789bceCopy full SHA for 0789bce
arch/lkl/kernel/time.c
@@ -105,6 +105,8 @@ static struct irqaction irq0 = {
105
void __init time_init(void)
106
{
107
int ret;
108
+ struct timespec ts;
109
+ unsigned long long time;
110
111
if (!lkl_ops->timer_alloc || !lkl_ops->timer_free ||
112
!lkl_ops->timer_set_oneshot || !lkl_ops->time) {
@@ -121,5 +123,10 @@ void __init time_init(void)
121
123
122
124
clockevents_config_and_register(&clockevent, HZ, 0, 0xffffffff);
125
126
+ time = lkl_ops->time();
127
+ ts.tv_sec = time / NSEC_PER_SEC;
128
+ ts.tv_nsec = time % NSEC_PER_SEC;
129
+ do_settimeofday(&ts);
130
+
131
pr_info("lkl: time and timers initialized (irq%d)\n", timer_irq);
132
}
0 commit comments