diff options
author | Will Deacon <will.deacon@arm.com> | 2019-02-22 15:59:59 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-04-08 13:59:47 +0300 |
commit | 60ca1e5a200cd294a12907fa36dece4241db4ab8 (patch) | |
tree | 2dcd2e666b2b1cad4ce0c80f263cb122bdeebc1b /include/asm-generic | |
parent | fdcd06a8ab775cbe716ff893372bed580e4c8a1c (diff) | |
download | linux-60ca1e5a200cd294a12907fa36dece4241db4ab8.tar.xz |
mmiowb: Hook up mmiowb helpers to spinlocks and generic I/O accessors
Removing explicit calls to mmiowb() from driver code means that we must
now call into the generic mmiowb_spin_{lock,unlock}() functions from the
core spinlock code. In order to elide barriers following critical
sections without any I/O writes, we also hook into the asm-generic I/O
routines.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/io.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 303871651f8a..bc490a746602 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -19,6 +19,7 @@ #include <asm-generic/iomap.h> #endif +#include <asm/mmiowb.h> #include <asm-generic/pci_iomap.h> #ifndef mmiowb @@ -49,7 +50,7 @@ /* serialize device access against a spin_unlock, usually handled there. */ #ifndef __io_aw -#define __io_aw() barrier() +#define __io_aw() mmiowb_set_pending() #endif #ifndef __io_pbw |