x86: remove 32-bit versions of readq()/writeq()
authorRoland Dreier <[email protected]>
Wed, 25 May 2011 00:13:09 +0000 (17:13 -0700)
committerLinus Torvalds <[email protected]>
Wed, 25 May 2011 15:39:44 +0000 (08:39 -0700)
commitdbee8a0affd5e6eaa5d7c816c4bc233f6f110f50
tree485bba5ec4436e9e8c84aacf25590ca8f8a6332b
parent818b667ba57f68bf1e7240fa441dda0b11e6b944
x86: remove 32-bit versions of readq()/writeq()

The presense of a writeq() implementation on 32-bit x86 that splits the
64-bit write into two 32-bit writes turns out to break the mpt2sas driver
(and in general is risky for drivers as was discussed in
<http://lkml.kernel.org/r/[email protected]>).  To fix this,
revert 2c5643b1c5c7 ("x86: provide readq()/writeq() on 32-bit too") and
follow-on cleanups.

This unfortunately leads to pushing non-atomic definitions of readq() and
write() to various x86-only drivers that in the meantime started using the
definitions in the x86 version of <asm/io.h>.  However as discussed
exhaustively, this is actually the right thing to do, because the right
way to split a 64-bit transaction is hardware dependent and therefore
belongs in the hardware driver (eg mpt2sas needs a spinlock to make sure
no other accesses occur in between the two halves of the access).

Build tested on 32- and 64-bit x86 allmodconfig.

Link: http://lkml.kernel.org/r/[email protected]
Acked-by: Hitoshi Mitake <[email protected]>
Cc: Kashyap Desai <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Ravi Anand <[email protected]>
Cc: Vikas Chaudhary <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Jason Uhlenkott <[email protected]>
Acked-by: James Bottomley <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/x86/Kconfig
arch/x86/include/asm/io.h
drivers/acpi/apei/einj.c
drivers/acpi/atomicio.c
drivers/edac/i3200_edac.c
drivers/platform/x86/ibm_rtl.c
drivers/platform/x86/intel_ips.c
drivers/scsi/qla4xxx/ql4_nx.c