MIPS: generic/ip32: io: fix __mem_ioswabq()
authorAlexander Lobakin <alobakin@pm.me>
Sat, 20 Jun 2020 09:34:43 +0000 (09:34 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 25 Jun 2020 08:34:45 +0000 (10:34 +0200)
*readq() family operates with u64 arguments, so they need 64-bit
byteswaps.
Correct macros for Generic MIPS and IP-32 to match other machines'
implementations.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/mach-generic/mangle-port.h
arch/mips/include/asm/mach-ip32/mangle-port.h

index f49dc99..e4daf16 100644 (file)
@@ -45,7 +45,7 @@
 # define ioswabl(a, x)         (x)
 # define __mem_ioswabl(a, x)   cpu_to_le32(x)
 # define ioswabq(a, x)         (x)
-# define __mem_ioswabq(a, x)   cpu_to_le32(x)
+# define __mem_ioswabq(a, x)   cpu_to_le64(x)
 
 #endif
 
index f1d0f17..c5ef72c 100644 (file)
@@ -21,6 +21,6 @@
 # define ioswabl(a, x)         (x)
 # define __mem_ioswabl(a, x)   cpu_to_le32(x)
 # define ioswabq(a, x)         (x)
-# define __mem_ioswabq(a, x)   cpu_to_le32(x)
+# define __mem_ioswabq(a, x)   cpu_to_le64(x)
 
 #endif /* __ASM_MACH_IP32_MANGLE_PORT_H */