Ralf Baechle
a904f74785
[MIPS] Sibyte: Fix race in sb1250_gettimeoffset().
...
From Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>:
sb1250_gettimeoffset() simply reads the current cpu 0 timer remaining
value, however once this counter reaches 0 and the interrupt is raised,
it immediately resets and begins to count down again.
If sb1250_gettimeoffset() is called on cpu 1 via do_gettimeofday() after
the timer has reset but prior to cpu 0 processing the interrupt and
taking write_seqlock() in timer_interrupt() it will return a full value
(or close to it) causing time to jump backwards 1ms. Once cpu 0 handles
the interrupt and timer_interrupt() gets far enough along it will jump
forward 1ms.
Fix this problem by implementing mips_hpt_*() on sb1250 using a spare
timer unrelated to the existing periodic interrupt timers. It runs at
1Mhz with a full 23bit counter. This eliminated the custom
do_gettimeoffset() for sb1250 and allowed use of the generic
fixed_rate_gettimeoffset() using mips_hpt_*() and timerhi/timerlo.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-03-18 16:59:30 +00:00
..
2005-09-05 00:06:07 -07:00
2005-10-29 19:31:35 +01:00
2005-11-17 16:23:48 +00:00
2005-10-29 19:30:52 +01:00
2005-09-05 00:06:07 -07:00
2006-02-07 13:30:23 +00:00
2006-02-07 13:30:22 +00:00
2005-11-17 16:23:42 +00:00
2005-10-29 19:31:35 +01:00
2006-02-14 19:13:23 +00:00
2006-01-10 13:39:06 +00:00
2006-01-12 09:08:50 -08:00
2006-02-07 13:30:22 +00:00
2006-01-10 13:39:06 +00:00
2005-09-05 00:06:07 -07:00
2005-11-17 16:23:54 +00:00
2005-10-29 19:32:37 +01:00
2006-01-10 13:39:06 +00:00
2005-11-17 16:23:42 +00:00
2005-10-29 19:31:54 +01:00
2005-12-01 11:05:15 +00:00
2006-02-14 19:13:23 +00:00
2005-10-29 19:31:17 +01:00
2005-10-29 19:32:32 +01:00
2006-01-10 13:39:06 +00:00
2005-11-17 16:23:57 +00:00
2005-10-18 18:03:47 -04:00
2006-03-18 16:59:30 +00:00
2005-10-29 19:32:19 +01:00
2006-02-07 13:30:26 +00:00
2005-10-29 19:31:57 +01:00
2006-01-10 13:39:07 +00:00
2005-09-05 00:06:06 -07:00
2006-02-08 17:52:25 +00:00
2005-10-29 19:32:46 +01:00
2005-10-29 19:31:18 +01:00
2005-09-09 22:32:31 +02:00
2005-09-09 22:32:31 +02:00
2005-09-05 00:06:07 -07:00
2006-02-27 17:30:36 +00:00
2005-09-07 16:57:21 -07:00
2006-02-07 13:30:24 +00:00
2005-10-29 19:31:57 +01:00
2005-10-29 19:30:34 +01:00
2005-10-29 19:32:38 +01:00
2005-10-29 19:31:05 +01:00
2006-02-07 13:30:25 +00:00
2006-01-08 20:13:39 -08:00
2006-02-07 13:30:25 +00:00
2005-10-29 19:32:25 +01:00
2005-10-29 19:32:40 +01:00
2006-03-18 16:59:27 +00:00
2006-03-18 16:59:27 +00:00
2006-02-14 19:13:25 +00:00
2006-01-10 13:39:04 +00:00
2005-10-28 08:16:48 -07:00
2006-01-10 13:39:04 +00:00
2006-01-10 13:39:08 +00:00
2005-07-26 14:35:41 -07:00
2005-11-07 18:05:40 +00:00
2005-10-29 19:32:40 +01:00
2005-10-29 19:30:28 +01:00
2005-09-05 00:06:07 -07:00
2005-10-29 19:31:14 +01:00
2005-10-29 19:31:13 +01:00
2005-10-29 19:32:21 +01:00
2006-03-18 16:59:26 +00:00
2005-10-29 19:31:42 +01:00
2005-10-29 19:31:17 +01:00
2006-02-07 13:30:26 +00:00
2005-10-29 19:30:57 +01:00
2006-03-18 16:59:28 +00:00
2005-10-29 19:30:50 +01:00
2005-09-05 00:06:06 -07:00
2005-11-07 18:05:38 +00:00
2005-10-29 19:32:10 +01:00
2006-01-10 13:39:05 +00:00
2006-02-15 15:32:22 -08:00
2005-10-29 19:31:00 +01:00
2005-10-29 19:32:40 +01:00
2005-11-07 18:05:34 +00:00
2005-09-05 00:06:06 -07:00
2006-01-09 15:59:19 -08:00
2005-10-29 19:30:53 +01:00
2005-10-29 19:32:37 +01:00
2005-10-29 19:32:49 +01:00
2005-10-29 19:30:31 +01:00
2005-10-29 19:32:09 +01:00
2005-10-30 17:37:22 -08:00
2005-10-29 19:31:37 +01:00
2005-11-07 07:53:41 -08:00
2006-01-12 09:08:59 -08:00
2005-10-29 19:32:29 +01:00
2005-09-05 00:06:04 -07:00
2006-03-18 16:59:27 +00:00
2006-02-07 13:30:22 +00:00
2005-09-05 00:06:08 -07:00
2005-09-05 00:06:06 -07:00
2005-11-07 18:05:38 +00:00
2005-11-07 18:05:33 +00:00
2005-10-30 17:37:27 -08:00
2005-10-29 19:30:52 +01:00
2005-09-05 00:06:06 -07:00
2005-10-29 19:31:17 +01:00
2005-10-29 19:31:15 +01:00
2005-11-17 16:23:38 +00:00
2005-09-09 22:32:31 +02:00
2006-02-27 17:30:36 +00:00
2005-10-29 19:32:26 +01:00
2005-09-10 10:06:21 -07:00
2005-10-29 19:32:40 +01:00
2005-10-29 19:31:39 +01:00
2005-09-05 00:06:07 -07:00
2006-02-07 13:30:25 +00:00
2006-02-27 17:30:35 +00:00
2006-02-08 17:52:24 +00:00
2005-11-07 18:05:38 +00:00
2005-09-05 00:06:07 -07:00
2005-10-29 19:31:53 +01:00
2005-09-05 00:06:06 -07:00
2006-02-21 16:58:22 +00:00
2006-02-21 16:58:23 +00:00
2006-03-09 18:05:10 +00:00
2005-10-29 19:31:23 +01:00
2005-09-05 00:06:07 -07:00