* PATCH: jiffies is UL
@ 2003-04-08 0:36 Alan Cox
2003-04-08 0:40 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2003-04-08 0:36 UTC (permalink / raw)
To: linux-kernel, torvalds
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.67/include/linux/time.h linux-2.5.67-ac1/include/linux/time.h
--- linux-2.5.67/include/linux/time.h 2003-03-06 17:04:37.000000000 +0000
+++ linux-2.5.67-ac1/include/linux/time.h 2003-03-07 14:57:13.000000000 +0000
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: jiffies is UL
2003-04-08 0:36 PATCH: jiffies is UL Alan Cox
@ 2003-04-08 0:40 ` Andrew Morton
2003-04-08 12:01 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2003-04-08 0:40 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, torvalds
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.67/include/linux/time.h linux-2.5.67-ac1/include/linux/time.h
> --- linux-2.5.67/include/linux/time.h 2003-03-06 17:04:37.000000000 +0000
> +++ linux-2.5.67-ac1/include/linux/time.h 2003-03-07 14:57:13.000000000 +0000
> @@ -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))
>
No, this is deliberate. It triggers a wrap from 0x00000000ffffffff to
0x0000000100000000 after 5 minutes uptime on 64-bit machines, which has found
bugs.
The fix is to add a comment, so this patch stops coming out ;)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: jiffies is UL
2003-04-08 0:40 ` Andrew Morton
@ 2003-04-08 12:01 ` Alan Cox
0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2003-04-08 12:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel Mailing List, Linus Torvalds
On Maw, 2003-04-08 at 01:40, Andrew Morton wrote:
> > -#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
> > +#define INITIAL_JIFFIES ((unsigned long) (-300*HZ))
> >
>
> No, this is deliberate. It triggers a wrap from 0x00000000ffffffff to
> 0x0000000100000000 after 5 minutes uptime on 64-bit machines, which has found
> bugs.
>
> The fix is to add a comment, so this patch stops coming out ;)
I which case it should be ((unsigned long)((unsigned int ....))
so the assignment type is right
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-08 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-08 0:36 PATCH: jiffies is UL Alan Cox
2003-04-08 0:40 ` Andrew Morton
2003-04-08 12:01 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®