kernel-ark/include/asm-powerpc
Paul Mackerras f007cacffc [POWERPC] Fix MMIO ops to provide expected barrier behaviour
This changes the writeX family of functions to have a sync instruction
before the MMIO store rather than after, because the generally expected
behaviour is that the device receiving the MMIO store can be guaranteed
to see the effects of any preceding writes to normal memory.

To preserve ordering between writeX and readX, and to preserve ordering
between preceding stores and the readX, the readX family of functions
have had an sync added before the load.

Although writeX followed by spin_unlock is not officially guaranteed
to keep the writeX inside the spin-locked region unless an mmiowb()
is used, there are currently drivers that depend on the previous
behaviour on powerpc, which was that the mmiowb wasn't actually required.
Therefore we have a per-cpu flag that is set by writeX, cleared by
__raw_spin_lock and mmiowb, and tested by __raw_spin_unlock.  If it is
set, __raw_spin_unlock does a sync and clears it.

This changes both 32-bit and 64-bit readX/writeX.  32-bit already has a
sync in __raw_spin_unlock (since lwsync doesn't exist on 32-bit), and thus
doesn't need the per-cpu flag.

Tested on G5 (PPC970) and POWER5.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-13 22:08:26 +10:00
..
iseries
8253pit.h
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
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_event.h
eeh.h [POWERPC] Fix MMIO ops to provide expected barrier behaviour 2006-09-13 22:08:26 +10:00
elf.h
emergency-restart.h
errno.h
fcntl.h
firmware.h
floppy.h
futex.h [POWERPC] Implement PowerPC futex_atomic_cmpxchg_inatomic(). 2006-09-13 18:28:41 +10:00
grackle.h
hardirq.h
heathrow.h
hvcall.h
hvconsole.h
hvcserver.h
hw_irq.h
i8259.h
ibmebus.h
ide.h
immap_86xx.h
io.h [POWERPC] Fix MMIO ops to provide expected barrier behaviour 2006-09-13 22:08:26 +10:00
ioctl.h
ioctls.h
iommu.h
ipc.h
ipcbuf.h
ipic.h [POWERPC] back up old school ipic.[hc] to arch/ppc 2006-08-30 10:34:33 +10:00
irq.h [PATCH] powerpc: fix trigger handling in the new irq code 2006-07-10 13:24:20 -07:00
irqflags.h
Kbuild
kdebug.h
kdump.h [POWERPC] kdump: Support kernels having 64k page size. 2006-09-13 18:30:04 +10:00
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
macio.h
mc146818rtc.h
mediabay.h
mman.h
mmu_context.h
mmu.h
mmzone.h
module.h
mpc86xx.h [POWERPC] Use mpc8641hpcn PIC base address from dev tree. 2006-08-25 14:32:13 +10:00
mpic.h [POWERPC] Support for "weird" MPICs and fixup mpc7448_hpc2 2006-08-30 14:29:42 +10:00
msgbuf.h
mutex.h
namei.h
nvram.h
of_device.h
ohare.h
oprofile_impl.h
paca.h [POWERPC] Fix MMIO ops to provide expected barrier behaviour 2006-09-13 22:08:26 +10:00
page_32.h
page_64.h
page.h
param.h
parport.h
pci-bridge.h
pci.h
percpu.h
pgalloc.h [POWERPC] hugepage BUG fix 2006-08-24 10:07:23 +10:00
pgtable-4k.h
pgtable-64k.h
pgtable.h
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
poll.h
posix_types.h
ppc_asm.h
ppc-pci.h
processor.h
prom.h [POWERPC] Make OF irq map code detect more error cases 2006-08-30 14:31:03 +10:00
pSeries_reconfig.h
ptrace.h
reg_8xx.h
reg.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
scatterlist.h
seccomp.h
sections.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
smp.h
smu.h
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h [POWERPC] Fix MMIO ops to provide expected barrier behaviour 2006-09-13 22:08:26 +10:00
spu_csa.h
spu_priv1.h
spu.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] Fix problem with time not advancing on 32-bit platforms 2006-08-30 16:09:43 +10:00
timex.h
tlb.h
tlbflush.h
todc.h
topology.h
tsi108_irq.h [POWERPC] Update mpc7448hpc2 board irq support using device tree 2006-08-23 15:51:18 +10:00
tsi108.h [POWERPC] Update mpc7448hpc2 board irq support using device tree 2006-08-23 15:51:18 +10:00
types.h
uaccess.h
ucontext.h
udbg.h
unaligned.h
uninorth.h
unistd.h
user.h
vdso_datapage.h
vdso.h
vga.h
vio.h
xmon.h
xor.h