Thread (29 messages) 29 messages, 8 authors, 2017-06-27

Re: [PATCH 4/7] alpha: provide ioread64 and iowrite64 implementations

From: Arnd Bergmann <arnd@arndb.de>
Date: 2017-06-22 21:03:22
Also in: dri-devel, linux-alpha, linux-arch, linux-crypto, lkml

On Thu, Jun 22, 2017 at 10:09 PM, Logan Gunthorpe [off-list ref] wrote:
On 6/22/2017 2:08 PM, Alan Cox wrote:
quoted
But this does not do the same thing as an ioread64 with regards to
atomicity or side effects on the device. The same is true of the other
hacks. You either have a real 64bit single read/write from MMIO space or
you don't. You can't fake it.

Yes, I know. But is it not better than having every driver that wants to use
these functions fake it themselves?
Drivers that want a non-atomic variant should include either
include/linux/io-64-nonatomic-hi-lo.h or include/linux/io-64-nonatomic-lo-hi.h
depending on what they need. Drivers that require 64-bit I/O should
probably just depend on CONFIG_64BIT and maybe use readq/writeq.

I see that there are exactly two drivers calling ioread64/iowrite64:
drivers/crypto/caam/ is architecture specific and
drivers/ntb/hw/intel/ntb_hw_intel.c already has a workaround that should
make it build on alpha.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help