Explorar o código

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>
Palmer Dabbelt %!s(int64=7) %!d(string=hai) anos
pai
achega
da894ff100
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/riscv/include/asm/io.h

+ 1 - 1
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;								\