[PATCH] UML - Fix wall_to_monotonic initialization

From: Jeff Dike
Date: Mon Jun 12 2006 - 23:19:03 EST


This is 2.6.17 material.

Change a variable from unsigned to signed in order to get sign-extension
when the thing is negated. Without this, uptime is horribly confused.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.16/arch/um/kernel/time_kern.c
===================================================================
--- linux-2.6.16.orig/arch/um/kernel/time_kern.c 2006-06-12 22:57:34.000000000 -0400
+++ linux-2.6.16/arch/um/kernel/time_kern.c 2006-06-12 23:01:48.000000000 -0400
@@ -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,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/