[PATCH] drm/amdgpu: replace readq/writeq with atomic64 operations
Christoph Hellwig
hch at infradead.org
Wed Aug 7 10:41:04 UTC 2019
On Wed, Aug 07, 2019 at 08:53:25AM +0000, Koenig, Christian wrote:
> Am 07.08.19 um 09:08 schrieb Christoph Hellwig:
> > On Wed, Aug 07, 2019 at 10:56:40AM +0800, Tao Zhou wrote:
> >> readq/writeq are not supported on all architectures
> > NAK. You must not use atomic_* on __iomem (MMIO) memory.
>
> Well then what's the right thing to do here?
>
> Essentially writeq/readq doesn't seems to be available on all
> architectures either.
writeq/readq are provided whenever the CPU actually supports 64-bit
atomic loads and stores. If it doesn't provide them atomic64* is
not going to be atomic vs the I/O device either. And that is on top
of the fact that for various architectures you can't simply use
plain loads and stores on MMIO memory to start with, which is why
we have the special accessors and the __iomem annotation.
More information about the amd-gfx
mailing list