login
Header Space

 
 

(regression) kernel/timeconst.h bugs with HZ=128

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Date: Tuesday, February 26, 2008 - 2:32 pm

I see these warnings on 32 bit ARM systems:

  CC      kernel/time.o
kernel/time.c: In function 'msecs_to_jiffies':
kernel/time.c:472: warning: integer constant is too large for 'long' type
kernel/time.c: In function 'usecs_to_jiffies':
kernel/time.c:487: warning: integer constant is too large for 'long' type

Line 472: 
	return ((u64)MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32)
line 487:
	return ((u64)USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)

The problem seems to be that these constants from kernel/timeconst.h
have too many digits:

#define ONLY_THIRTYTWO_BITS	0x01234567

#define MSEC_TO_HZ_ADJ32        0x3f7ced916
#define USEC_TO_HZ_ADJ32        0xfffbce4217d

Those *_ADJ32 constants should have "ULL" suffixes, yes?
Adding that by hand resolves the problem, but only until
the next time that header file gets regenerated.

Someone with observable Perl-fu should fix this ...

- Dave

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
(regression) kernel/timeconst.h bugs with HZ=128, David Brownell, (Tue Feb 26, 2:32 pm)
Re: (regression) kernel/timeconst.h bugs with HZ=128, Andrew Morton, (Tue Feb 26, 8:09 pm)
Re: (regression) kernel/timeconst.h bugs with HZ=128, H. Peter Anvin, (Tue Feb 26, 8:34 pm)
speck-geostationary