aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel/time_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/time_kern.c')
-rw-r--r--arch/um/kernel/time_kern.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
index 3c7626cdba4..86f51d04c98 100644
--- a/arch/um/kernel/time_kern.c
+++ b/arch/um/kernel/time_kern.c
@@ -84,6 +84,16 @@ void timer_irq(union uml_pt_regs *regs)
}
}
+
+void time_init_kern(void)
+{
+ unsigned long long nsecs;
+
+ nsecs = os_nsecs();
+ set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION,
+ -nsecs % BILLION);
+}
+
void do_boot_timer_handler(struct sigcontext * sc)
{
struct pt_regs regs;
@@ -209,4 +219,4 @@ int __init timer_init(void)
return(0);
}
-__initcall(timer_init);
+arch_initcall(timer_init);