]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc: enable ARCH_USE_BUILTIN_BSWAP
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 3 Dec 2012 16:46:54 +0000 (16:46 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 20 Dec 2012 01:05:25 +0000 (01:05 +0000)
commit2fdd053bc7fb5ed1f61533fd66d9ebd2a22cc282
tree0a291bd61dafdf98ee29a1b3f38b489f2eefb832
parent7f2de8171ddf28fdb2ca7f9a683ee1207849f718
powerpc: enable ARCH_USE_BUILTIN_BSWAP

By using the compiler intrinsics instead of hand-crafted opaque inline
assembler for byte-swapping, we let the compiler see what's actually
happening and it gets to use lwbrx/stwbrx instructions instead of a
normal load/store coupled with a sequence of rlwimi instructions to
move bits around.

Compiled-tested only. It gave a code size reduction of almost 4% for
ext2, and more like 2.5% for ext3/ext4.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
arch/powerpc/Kconfig