aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ktime.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-03-16 18:15:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-16 22:25:07 -0400
commit5379058b718ac6354ba99cc74d10c28d632dc28a (patch)
tree9d88b7ca32450668c34e610f34c61db2d72fd72e /include/linux/ktime.h
parent014efb1df74fe5a30bb10102404428fd4229726e (diff)
[PATCH] fix MTIME_SEC_MAX on 32-bit
The maximum seconds value we can handle on 32bit is LONG_MAX. Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/ktime.h')
-rw-r--r--include/linux/ktime.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index c68c7ac6b232..248305bb9a18 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -57,7 +57,11 @@ typedef union {
57} ktime_t; 57} ktime_t;
58 58
59#define KTIME_MAX ((s64)~((u64)1 << 63)) 59#define KTIME_MAX ((s64)~((u64)1 << 63))
60#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) 60#if (BITS_PER_LONG == 64)
61# define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
62#else
63# define KTIME_SEC_MAX LONG_MAX
64#endif
61 65
62/* 66/*
63 * ktime_t definitions when using the 64-bit scalar representation: 67 * ktime_t definitions when using the 64-bit scalar representation: