mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
[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>
This commit is contained in:
parent
014efb1df7
commit
5379058b71
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,11 @@ typedef union {
|
||||||
} ktime_t;
|
} ktime_t;
|
||||||
|
|
||||||
#define KTIME_MAX ((s64)~((u64)1 << 63))
|
#define KTIME_MAX ((s64)~((u64)1 << 63))
|
||||||
#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
|
#if (BITS_PER_LONG == 64)
|
||||||
|
# define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
|
||||||
|
#else
|
||||||
|
# define KTIME_SEC_MAX LONG_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ktime_t definitions when using the 64-bit scalar representation:
|
* ktime_t definitions when using the 64-bit scalar representation:
|
||||||
|
|
Loading…
Reference in a new issue