linux/arch
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
..
alpha [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
arm [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches 2006-09-02 18:43:20 +01:00
arm26 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
cris [PATCH] pcf8563: remove MOD_INC_USE_COUNT, MOD_DEC_USE_COUNT 2006-07-10 13:24:22 -07:00
frv [PATCH] FRV: Use the generic time stuff for FRV 2006-09-06 11:00:02 -07:00
h8300 [PATCH] irq-flags: H8300: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
i386 [PATCH] Fix faulty HPET clocksource usage (fix for bug #7062) 2006-09-01 11:39:08 -07:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-08-30 17:12:11 -07:00
m32r [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
m68k [PATCH] irq-flags: M68K: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
m68knommu [PATCH] irq-flags: M68KNOMMU: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
mips [MIPS] sparsemem: fix crash in show_mem 2006-07-13 21:26:22 +01:00
parisc [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
powerpc [POWERPC] Fix MMIO ops to provide expected barrier behaviour 2006-09-13 22:08:26 +10:00
ppc [POWERPC] update prep_defconfig 2006-09-13 18:30:08 +10:00
s390 [S390] broken copy_in_user function. 2006-08-30 14:33:30 +02:00
sh [PATCH] sh: fix proc file removal for superh store queue module 2006-08-06 08:57:48 -07:00
sh64 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
sparc [SPARC]: Small smp cleanup. 2006-08-26 17:52:56 -07:00
sparc64 [SPARC64]: Fix X server hangs due to large pages. 2006-08-29 21:23:31 -07:00
um [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
v850 [PATCH] v850: call init_page_count() instead of set_page_count() 2006-07-31 13:28:38 -07:00
x86_64 [PATCH] x86_64: Don't write out segments from vsyscall32 DSO if it is not mapped 2006-08-30 16:05:16 -07:00
xtensa [PATCH] xtensa: ptrace: EXIT_ZOMBIE fix 2006-09-01 11:39:08 -07:00