diff options
author | Helge Deller <deller@gmx.de> | 2007-02-10 04:45:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:31 -0500 |
commit | 3db5db4fcdafc85b99d171336a7d2f25765ccd13 (patch) | |
tree | 5fb1f991a7eb0de9fcab48d1a889f4324c823077 /kernel/timer.c | |
parent | fc0ecff698165ae8e178efa086e0dd1f385206b1 (diff) |
[PATCH] use cycle_t instead of u64 in struct time_interpolator
The 32bit and 64bit PARISC Linux kernels suffers from the problem, that the
gettimeofday() call sometimes returns non-monotonic times.
The easiest way to fix this, is to drop the PARISC-specific implementation
and switch over to the generic TIME_INTERPOLATION framework.
But in order to make it even compile on 32bit PARISC, the patch below which
touches the generic Linux code, is mandatory.
More information and the full patch with the parisc-specific changes is included in this thread: http://lists.parisc-linux.org/pipermail/parisc-linux/2006-December/031003.html
As far as I could see, this patch does not change anything for the existing
architectures which use this framework (IA64 and SPARC64), since "cycles_t"
is defined there as unsigned 64bit-integer anyway (which then makes this
patch a no-change for them).
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <linux-arch@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
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 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index c2a8ccfc2882..d38801a95866 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1624,7 +1624,7 @@ struct time_interpolator *time_interpolator __read_mostly; | |||
1624 | static struct time_interpolator *time_interpolator_list __read_mostly; | 1624 | static struct time_interpolator *time_interpolator_list __read_mostly; |
1625 | static DEFINE_SPINLOCK(time_interpolator_lock); | 1625 | static DEFINE_SPINLOCK(time_interpolator_lock); |
1626 | 1626 | ||
1627 | static inline u64 time_interpolator_get_cycles(unsigned int src) | 1627 | static inline cycles_t time_interpolator_get_cycles(unsigned int src) |
1628 | { | 1628 | { |
1629 | unsigned long (*x)(void); | 1629 | unsigned long (*x)(void); |
1630 | 1630 | ||
@@ -1650,8 +1650,8 @@ static inline u64 time_interpolator_get_counter(int writelock) | |||
1650 | 1650 | ||
1651 | if (time_interpolator->jitter) | 1651 | if (time_interpolator->jitter) |
1652 | { | 1652 | { |
1653 | u64 lcycle; | 1653 | cycles_t lcycle; |
1654 | u64 now; | 1654 | cycles_t now; |
1655 | 1655 | ||
1656 | do { | 1656 | do { |
1657 | lcycle = time_interpolator->last_cycle; | 1657 | lcycle = time_interpolator->last_cycle; |