Commit ede6f5ae authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Fix up 64-bit byte swaps for most 32-bit architectures

The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores).  We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.
Reported-and-tested-by: default avatarNicolas Pitre <>
Reported-by: default avatarBenjamin Herrenschmidt <>
Cc: Harvey Harrison <>
Signed-off-by: default avatarLinus Torvalds <>
parent 637b180c
......@@ -68,7 +68,7 @@ static inline __attribute_const__ __u64 __fswab64(__u64 val)
#elif defined(__SWAB_64_THRU_32__)
__u32 h = val >> 32;
__u32 l = val & ((1ULL << 32) - 1);
return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h)));
return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
return ___constant_swab64(val);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment