Messages in this thread | | | Date | Mon, 1 Nov 2004 02:23:11 +0000 | From | Matthew Wilcox <> | Subject | Bug in cpu_to_le32 |
| |
Grant Grundler spotted we weren't using the optimised byteswap routines on PA-RISC. Here's why:
include/linux/byteorder/generic.h:90:#define le32_to_cpu __le32_to_cpu include/linux/byteorder/big_endian.h:33:#define __le32_to_cpu(x) ___swab32((__force __u32)(__le32)(x)) and byteorder/swab.h: #define ___swab32(x) \ ({ \ __u32 __x = (x); \ ((__u32)( \ (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \ (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \ (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \ (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \ })
So le32_to_cpu() doesn't use optimised assembler on any platform. And for all you using ext3 on i386 ...
include/linux/byteorder/generic.h:95:#define cpu_to_be32 __cpu_to_be32 include/linux/byteorder/little_endian.h:38:#define __cpu_to_be32(x) ((__force __be32)___swab32((x)))
So it's not being used there either. What is ___swabN() for anyway? It seems to be a duplicate of ___constant_swabN().
-- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |