aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-03 13:54:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-03 13:54:23 -0400
commite098675635479e9267cf2b12fb969c463cf506ab (patch)
treee41e2af0333400e089ba4df3ade1528fe6dce56e /kernel/time.c
parent2905474d3842bfab0b9d8197fb1f4576462901da (diff)
parentb9095fd8a7f41dc7ac0b0b7864f74766a3056f96 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes
* git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes: (24 commits) Make constants in kernel/timeconst.h fixed 64 bits types: add C99-style constructors to <asm-generic/int-*.h> xtensa: types: use <asm-generic/int-*.h> for the xtensa architecture x86: types: use <asm-generic/int-*.h> for the x86 architecture v850: types: use <asm-generic/int-*.h> for the v850 architecture sparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture sparc: types: use <asm-generic/int-*.h> for the sparc architecture sh: types: use <asm-generic/int-*.h> for the sh architecture s390: types: use <asm-generic/int-*.h> for the s390 architecture powerpc: types: use <asm-generic/int-*.h> for the powerpc architecture parisc: types: use <asm-generic/int-*.h> for the parisc architecture mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture mips: types: use <asm-generic/int-*.h> for the mips architecture m68k: types: use <asm-generic/int-*.h> for the m68k architecture m32r: types: use <asm-generic/int-*.h> for the m32r architecture ia64: types: use <asm-generic/int-*.h> for the ia64 architecture h8300: types: use <asm-generic/int-*.h> for the h8300 architecture frv: types: use <asm-generic/int-*.h> for the frv architecture cris: types: use <asm-generic/int-*.h> for the cris architecture blackfin: types: use <asm-generic/int-*.h> for the blackfin architecture ...
Diffstat (limited to 'kernel/time.c')
-rw-r--r--kernel/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/time.c b/kernel/time.c
index cbe0d5a222ff..6a08660b4fac 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -246,7 +246,7 @@ unsigned int inline jiffies_to_msecs(const unsigned long j)
246 return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); 246 return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC);
247#else 247#else
248# if BITS_PER_LONG == 32 248# if BITS_PER_LONG == 32
249 return ((u64)HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; 249 return (HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32;
250# else 250# else
251 return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN; 251 return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN;
252# endif 252# endif
@@ -262,7 +262,7 @@ unsigned int inline jiffies_to_usecs(const unsigned long j)
262 return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); 262 return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC);
263#else 263#else
264# if BITS_PER_LONG == 32 264# if BITS_PER_LONG == 32
265 return ((u64)HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32; 265 return (HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32;
266# else 266# else
267 return (j * HZ_TO_USEC_NUM) / HZ_TO_USEC_DEN; 267 return (j * HZ_TO_USEC_NUM) / HZ_TO_USEC_DEN;
268# endif 268# endif
@@ -476,7 +476,7 @@ unsigned long msecs_to_jiffies(const unsigned int m)
476 if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) 476 if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
477 return MAX_JIFFY_OFFSET; 477 return MAX_JIFFY_OFFSET;
478 478
479 return ((u64)MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) 479 return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32)
480 >> MSEC_TO_HZ_SHR32; 480 >> MSEC_TO_HZ_SHR32;
481#endif 481#endif
482} 482}
@@ -491,7 +491,7 @@ unsigned long usecs_to_jiffies(const unsigned int u)
491#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) 491#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
492 return u * (HZ / USEC_PER_SEC); 492 return u * (HZ / USEC_PER_SEC);
493#else 493#else
494 return ((u64)USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32) 494 return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)
495 >> USEC_TO_HZ_SHR32; 495 >> USEC_TO_HZ_SHR32;
496#endif 496#endif
497} 497}