Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: generic/ip32: io: fix __mem_ioswabq()

*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>

authored by

Alexander Lobakin and committed by
Thomas Bogendoerfer
3612485b 2984b3f8

+2 -2
+1 -1
arch/mips/include/asm/mach-generic/mangle-port.h
··· 45 45 # define ioswabl(a, x) (x) 46 46 # define __mem_ioswabl(a, x) cpu_to_le32(x) 47 47 # define ioswabq(a, x) (x) 48 - # define __mem_ioswabq(a, x) cpu_to_le32(x) 48 + # define __mem_ioswabq(a, x) cpu_to_le64(x) 49 49 50 50 #endif 51 51
+1 -1
arch/mips/include/asm/mach-ip32/mangle-port.h
··· 21 21 # define ioswabl(a, x) (x) 22 22 # define __mem_ioswabl(a, x) cpu_to_le32(x) 23 23 # define ioswabq(a, x) (x) 24 - # define __mem_ioswabq(a, x) cpu_to_le32(x) 24 + # define __mem_ioswabq(a, x) cpu_to_le64(x) 25 25 26 26 #endif /* __ASM_MACH_IP32_MANGLE_PORT_H */