original_kernel/include/asm-powerpc
Nathan Lynch 5db9fa9593 [POWERPC] Fix gettimeofday inaccuracies
There are two problems in the powerpc gettimeofday code which can
cause incorrect results to be returned.

The first is that there is a race between do_gettimeofday and the
timer interrupt:

1. do_gettimeofday does get_tb()

2. decrementer exception on boot cpu which runs timer_recalc_offset,
   which also samples the timebase and updates the do_gtod structure
   with a greater timebase value.

3. do_gettimeofday calls __do_gettimeofday, which leads to the
   negative result from tb_val - temp_varp->tb_orig_stamp.

The second is caused by taking the boot cpu offline, which can cause
the value of tb_last_jiffy to be increased past the currently
available timebase, causing the same underflow as above.

[paulus@samba.org - define and use data_barrier() instead of mb().]

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23 15:51:18 +10:00
..
iseries [POWERPC] Clean up it_lp_queue.h 2006-06-28 15:18:55 +10:00
8253pit.h
Kbuild
a.out.h
abs_addr.h
agp.h
asm-compat.h
atomic.h power: improve inline asm memory constraints 2006-07-08 15:00:28 -07:00
auxvec.h
backlight.h [PATCH] powermac: More powermac backlight fixes 2006-07-31 13:28:45 -07:00
bitops.h power: improve inline asm memory constraints 2006-07-08 15:00:28 -07:00
bootx.h
btext.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
checksum.h
compat.h
cputable.h [POWERPC] Simplify the code defining the 64-bit CPU features 2006-06-28 15:19:03 +10:00
cputime.h [PATCH] powerpc: implement missing jiffies64_to_cputime64() 2006-07-05 09:39:54 -07:00
current.h
dbdma.h
delay.h
div64.h
dma-mapping.h
dma.h
eeh.h
eeh_event.h
elf.h
emergency-restart.h
errno.h
fcntl.h
firmware.h
floppy.h [PATCH] irq-flags: POWERPC: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
futex.h
grackle.h
hardirq.h
heathrow.h
hvcall.h
hvconsole.h
hvcserver.h
hw_irq.h [PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend() 2006-06-29 10:26:23 -07:00
i8259.h [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
ibmebus.h
ide.h
immap_86xx.h
io.h
ioctl.h
ioctls.h
iommu.h
ipc.h
ipcbuf.h
ipic.h
irq.h [PATCH] powerpc: fix trigger handling in the new irq code 2006-07-10 13:24:20 -07:00
irqflags.h [PATCH] lockdep: irqtrace subsystem, core 2006-07-03 15:27:03 -07:00
kdebug.h
kdump.h
kexec.h [POWERPC] Make crash.c work on 32-bit and 64-bit 2006-08-17 16:41:10 +10:00
keylargo.h
kmap_types.h
kprobes.h [PATCH] IA64: kprobe invalidate icache of jump buffer 2006-07-31 13:28:38 -07:00
linkage.h
lmb.h
local.h
lppaca.h
machdep.h [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
macio.h
mc146818rtc.h
mediabay.h
mman.h
mmu.h [POWERPC] powerpc: Initialise ppc_md htab pointers earlier 2006-06-28 11:59:47 +10:00
mmu_context.h [POWERPC] Correct the MAX_CONTEXT definition 2006-06-29 16:16:15 +10:00
mmzone.h
module.h
mpc86xx.h Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc 2006-06-28 16:10:53 +10:00
mpic.h [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
msgbuf.h
mutex.h
namei.h
nvram.h
of_device.h typo fixes: mecanism -> mechanism 2006-06-30 18:20:44 +02:00
ohare.h
oprofile_impl.h
pSeries_reconfig.h
paca.h
page.h
page_32.h
page_64.h
param.h
parport.h
pci-bridge.h
pci.h
percpu.h [PATCH] lockdep: add per_cpu_offset() 2006-07-03 15:27:00 -07:00
pgalloc.h
pgtable-4k.h
pgtable-64k.h
pgtable.h
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h typo fixes: mecanism -> mechanism 2006-06-30 18:20:44 +02:00
pmc.h
poll.h
posix_types.h
ppc-pci.h
ppc_asm.h
processor.h
prom.h [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
ptrace.h
reg.h
reg_8xx.h
resource.h
rtas.h [POWERPC] Fix might-sleep warning on removing cpus 2006-08-08 16:00:11 +10:00
rtc.h
rwsem.h [PATCH] lockdep: remove RWSEM_DEBUG remnants 2006-07-03 15:27:01 -07:00
scatterlist.h
seccomp.h
sections.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] irq-flags: POWERPC: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
smp.h
smu.h
socket.h [AF_UNIX]: Datagram getpeersec 2006-06-29 16:58:06 -07:00
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
spu.h [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
spu_csa.h
spu_priv1.h
sstep.h
stat.h
statfs.h
string.h
synch.h
syscalls.h
systbl.h
system.h [POWERPC] Fix gettimeofday inaccuracies 2006-08-23 15:51:18 +10:00
tce.h
termbits.h
termios.h
thread_info.h
time.h [POWERPC] update asm-powerpc/time.h 2006-06-28 15:18:56 +10:00
timex.h
tlb.h
tlbflush.h
todc.h [POWERPC] todc: add support for Time-Of-Day-Clock 2006-06-29 16:22:46 +10:00
topology.h
tsi108.h [POWERPC] Add tsi108 pci and platform device data register function 2006-06-29 16:20:36 +10:00
types.h
uaccess.h
ucontext.h
udbg.h [POWERPC] Add udbg support for RTAS console 2006-06-28 11:59:48 +10:00
unaligned.h
uninorth.h
unistd.h
user.h
vdso.h
vdso_datapage.h
vga.h
vio.h
xmon.h
xor.h