2.5.64 and jiffies wrap

Jens Axboe (axboe@suse.de)
Fri, 7 Mar 2003 14:05:04 +0100


Hi,

The patch doesn't look right, why is INITIAL_JIFFIES being cast to
unsigned int? This breaks x86_64 at least.

--- /opt/kernel/linux-2.5.64/arch/x86_64/kernel/time.c 2003-03-07 13:54:40.000000000 +0100
+++ linux-2.5.64/arch/x86_64/kernel/time.c 2003-03-07 13:17:58.000000000 +0100
@@ -30,7 +30,7 @@
#include <asm/apic.h>
#endif

-u64 jiffies_64;
+u64 jiffies_64 = INITIAL_JIFFIES;

extern int using_apic_timer;

--- /opt/kernel/linux-2.5.64/include/linux/time.h 2003-03-07 13:54:41.000000000 +0100
+++ linux-2.5.64/include/linux/time.h 2003-03-07 13:18:10.000000000 +0100
@@ -31,7 +31,7 @@
* Have the 32 bit jiffies value wrap 5 minutes after boot
* so jiffies wrap bugs show up earlier.
*/
-#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
+#define INITIAL_JIFFIES ((unsigned long) (-300*HZ))

/*
* Change timeval to jiffies, trying to avoid the

-- 
Jens Axboe

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