linux/arch/sparc64/kernel
Richard Mortimer 9eb3394bf2 [SPARC64]: Eliminate race condition reading Hummingbird STICK register
Ensure a consistent value is read from the STICK register by ensuring
that both high and low are read without high changing due to a roll
over of the low register.

Various Debian/SPARC users (myself include) have noticed problems with
Hummingbird based systems. The symptoms are that the system time is
seen to jump forward 3 days, 6 hours, 11 minutes give or take a few
seconds. In many cases the system then hangs some time afterwards.

I've spotted a race condition in the code to read the STICK register.
I could not work out why 3d, 6h, 11m is important but guess that it is
due to the 2^32 jump of STICK (forwards on one read and then the next
read will seem to be backwards) during a timer interrupt. I'm guessing
that a change of -2^32 will get converted to a large unsigned
increment after the arithmetic manipulation between STICK,
nanoseconds, jiffies etc.

I did a test where I modified __hbird_read_stick to artificially
inject rollover faults forcefully every few seconds. With this I saw
the clock jump over 6 times in 12 hours compared to once every month
or so.

Signed-off-by: Richard Mortimer <richm@oldelvet.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-17 15:21:01 -08:00
..
asm-offsets.c
auxio.c
binfmt_aout32.c
binfmt_elf32.c
central.c
chmc.c
cpu.c
devices.c
dtlb_backend.S
dtlb_base.S
dtlb_prot.S
ebus.c
entry.S
etrap.S
head.S
idprom.c
init_task.c
iommu_common.c
iommu_common.h
irq.c
isa.c
itlb_base.S
kprobes.c
ktlb.S
Makefile
module.c
pci_common.c
pci_impl.h
pci_iommu.c
pci_psycho.c
pci_sabre.c
pci_schizo.c
pci.c
power.c
process.c [PATCH] sparc64: task_stack_page() 2006-01-12 09:08:52 -08:00
ptrace.c [PATCH] sparc64: task_pt_regs() 2006-01-12 09:08:52 -08:00
rtrap.S
sbus.c
semaphore.c
setup.c
signal32.c
signal.c
smp.c
sparc64_ksyms.c
starfire.c
sunos_ioctl32.c
sys32.S
sys_sparc32.c
sys_sparc.c
sys_sunos32.c
systbls.S
time.c [SPARC64]: Eliminate race condition reading Hummingbird STICK register 2006-01-17 15:21:01 -08:00
trampoline.S
traps.c [PATCH] sparc64: task_stack_page() 2006-01-12 09:08:52 -08:00
ttable.S
una_asm.S
unaligned.c
us2e_cpufreq.c
us3_cpufreq.c
vmlinux.lds.S
winfixup.S