summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@sifive.com>2017-11-28 23:15:32 +0100
committerPalmer Dabbelt <palmer@sifive.com>2017-12-01 22:09:57 +0100
commitda894ff100be9044c490f47f61541481b4f42b1f (patch)
tree7b6595ab3b92f94b4340a333e6da8146d6c21697 /arch
parentLinux 4.15-rc1 (diff)
downloadlinux-da894ff100be9044c490f47f61541481b4f42b1f.tar.xz
linux-da894ff100be9044c490f47f61541481b4f42b1f.zip
RISC-V: __io_writes should respect the length argument
Whoops -- I must have just been being an idiot again. Thanks to Segher for finding the bug :). CC: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/asm/io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h
index c1f32cfcc79b..507ee6a16e67 100644
--- a/arch/riscv/include/asm/io.h
+++ b/arch/riscv/include/asm/io.h
@@ -250,7 +250,7 @@ static inline u64 __raw_readq(const volatile void __iomem *addr)
const ctype *buf = buffer; \
\
do { \
- __raw_writeq(*buf++, addr); \
+ __raw_write ## len(*buf++, addr); \
} while (--count); \
} \
afence; \