From: David Woodhouse Date: Mon, 3 Dec 2012 16:46:54 +0000 (+0000) Subject: powerpc: enable ARCH_USE_BUILTIN_BSWAP X-Git-Tag: next-20130218~119^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2fdd053bc7fb5ed1f61533fd66d9ebd2a22cc282;p=karo-tx-linux.git 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 Acked-by: H. Peter Anvin --- diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 951a517a1a0f..064e418d8b37 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -146,6 +146,7 @@ config PPC select MODULES_USE_ELF_RELA select GENERIC_KERNEL_EXECVE select CLONE_BACKWARDS + select ARCH_USE_BUILTIN_BSWAP config EARLY_PRINTK bool