OpenCloudOS-Kernel/arch/mips/sibyte/sb1250
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
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bcm1250_tbprof.c Switch Sibyte profiling driver to ->compat_ioctl 2005-10-29 19:32:29 +01:00
bus_watcher.c Switch SiByte drivers back to __raw_*() functions. 2005-10-29 19:30:44 +01:00
irq.c Use cpumask_t rather than hand-rolled bitmask code in sb1250_set_affinity. 2005-10-29 19:32:32 +01:00
irq_handler.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prom.c [MIPS] Rename _machine_power_off to pm_power_off so the kernel builds again. 2006-02-07 13:30:22 +00:00
setup.c [MIPS] Reformat to 80 columns. 2006-02-07 13:30:23 +00:00
smp.c Switch SiByte drivers back to __raw_*() functions. 2005-10-29 19:30:44 +01:00
time.c [MIPS] Sibyte: Fix race in sb1250_gettimeoffset(). 2006-03-18 16:59:30 +00:00