diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2013-08-01 14:57:16 +0530 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-06 16:00:29 +1000 |
commit | 69772c33c22416603a136d53a3311d961efaab61 (patch) | |
tree | 17464f50b12af814f9e3d8077f68627cd0d8e432 /lib | |
parent | 3a83de22bea75033af72ab6b5b6344ca893f0bbe (diff) | |
download | SLOF-69772c33c22416603a136d53a3311d961efaab61.zip SLOF-69772c33c22416603a136d53a3311d961efaab61.tar.gz SLOF-69772c33c22416603a136d53a3311d961efaab61.tar.bz2 |
usb: add mb for write accessors
Introduce mb() in all the variants of write_reg* before the hcall
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libusb/tools.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libusb/tools.h b/lib/libusb/tools.h index 2a54f49..497a1a0 100644 --- a/lib/libusb/tools.h +++ b/lib/libusb/tools.h @@ -26,6 +26,7 @@ static inline uint32_t read_reg32(uint32_t *reg) static inline void write_reg32(uint32_t *reg, uint32_t value) { + mb(); ci_write_32(reg, bswap_32(value)); } @@ -36,6 +37,7 @@ static inline uint8_t read_reg8(uint8_t *reg) static inline void write_reg8(uint8_t *reg, uint8_t value) { + mb(); ci_write_8(reg, value); } @@ -46,6 +48,7 @@ static inline uint16_t read_reg16(uint16_t *reg) static inline void write_reg16(uint16_t *reg, uint16_t value) { + mb(); ci_write_16(reg, bswap_16(value)); } @@ -56,6 +59,7 @@ static inline uint64_t read_reg64(uint64_t *reg) static inline void write_reg64(uint64_t *reg, uint64_t value) { + mb(); ci_write_64(reg, bswap_64(value)); } @@ -66,6 +70,7 @@ static inline uint32_t ci_read_reg(uint32_t *reg) static inline void ci_write_reg(uint32_t *reg, uint32_t value) { + mb(); ci_write_32(reg, bswap_32(value)); } |