Re: [PATCH *] use 64 bit jiffies

Matti Aarnio
2003-02-17T14:38:21Z

On Mon, Feb 17, 2003 at 02:55:05PM +0100, Jörn Engel wrote:

With:

> +#ifdef CONFIG_DEBUG_JIFFIESWRAP
> + /* Make the jiffies counter wrap around sooner. */
> +# define INITIAL_JIFFIES ((unsigned long)(-300*HZ))
> +#else
> +# define INITIAL_JIFFIES 0
> +#endif

This will store constants into jiffies_msb_flips:
("1" for DEBUG_JIFFIESWRAP, "0" otherwise.)
Wouldn't zero be what will always be needed ?

> -unsigned long volatile jiffies;
> +unsigned long volatile jiffies = INITIAL_JIFFIES;
> #ifdef NEEDS_JIFFIES_64
> -static unsigned int volatile jiffies_msb_flips;
> +static unsigned int volatile
> + jiffies_msb_flips = INITIAL_JIFFIES>>(BITS_PER_LONG-1);
> #endif

/Matti Aarnio