From e0072c1bbbdcb819e8df0a67229bb9eed2accec3 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 20 Jun 2006 18:25:03 -0400 Subject: [PATCH] [PATCH] UML: fix uptime The use of signed instead of unsigned here broke the calculations on negative numbers that are involved in calculating wall_to_monotonic. Signed-off-by: Jeff Dike Signed-off-by: Chris Wright --- arch/um/kernel/time_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 86f51d04c98d..87cdbc560d36 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c @@ -87,7 +87,7 @@ void timer_irq(union uml_pt_regs *regs) void time_init_kern(void) { - unsigned long long nsecs; + long long nsecs; nsecs = os_nsecs(); set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, -- 2.39.5