04 Jul, 2014
1 commit
-
Even on x86-64, I've found the need to break up a readq() into 2 readl()
calls. According to the Intel datasheet for the E3-1200 processor:"
Software must not access B0/D0/F0 32-bit memory-mapped registers with
requests that cross a DW boundary.
"(http://www.intel.com/content/www/us/en/processors/xeon/xeon-e3-1200-family-vol-2-datasheet.html p. 16)
I can confirm this is true via several hard machine lockups.
Thus, add explicit hi_lo_[readq|write]_q and lo_hi_[read|write]_q so that these
uses are spelled out.Signed-off-by: Jason Baron
Link: http://lkml.kernel.org/r/281f09da7ad01e5cea99737ec34d2399bdbbbf63.1403818526.git.jbaron@akamai.com
Signed-off-by: Borislav Petkov
22 Feb, 2012
1 commit
-
This provides unified readq()/writeq() helper functions for 32-bit
drivers.For some cases, readq/writeq without atomicity is harmful, and order of
io access has to be specified explicitly. So in this patch, new two
header files which contain non-atomic readq/writeq are added.- provides non-atomic readq/
writeq with the order of lower address -> higher address- provides non-atomic readq/
writeq with reversed orderThis allows us to remove some readq()s that were added drivers when the
default non-atomic ones were removed in commit dbee8a0affd5 ("x86:
remove 32-bit versions of readq()/writeq()")The drivers which need readq/writeq but can do with the non-atomic ones
must add the line:#include /* or hi-lo.h */
But this will be nop in 64-bit environments, and no other #ifdefs are
required. So I believe that this patch can solve the problem of
1. driver-specific readq/writeq
2. atomicity and order of io accessThis patch is tested with building allyesconfig and allmodconfig as
ARCH=x86 and ARCH=i386 on top of tip/master.Cc: Kashyap Desai
Cc: Len Brown
Cc: Ravi Anand
Cc: Vikas Chaudhary
Cc: Matthew Garrett
Cc: Jason Uhlenkott
Cc: James Bottomley
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Roland Dreier
Cc: James Bottomley
Cc: Alan Cox
Cc: Matthew Wilcox
Cc: Andrew Morton
Signed-off-by: Hitoshi Mitake
Signed-off-by: Linus Torvalds