[-stable PATCH] UML - fix uptime

From: Jeff Dike
Date: Tue Jun 20 2006 - 18:24:29 EST


Please consider this for 2.6.17-stable. It made -mm briefly, but missed
2.6.17. It fixes the value of uptime, which was broken by a patch late in
2.6.17-rc.

The use of unsigned instead of unsigned here broke the calculations on
negative numbers that are involved in calculating wall_to_monotonic.

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

Index: linux-2.6.17-mm/arch/um/kernel/time_kern.c
===================================================================
--- linux-2.6.17-mm.orig/arch/um/kernel/time_kern.c 2006-06-11 16:35:49.000000000 -0400
+++ linux-2.6.17-mm/arch/um/kernel/time_kern.c 2006-06-12 17:44:54.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/