]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Enable ARCH_USE_BUILTIN_BSWAP
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 19 Dec 2012 15:14:17 +0000 (15:14 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:00:54 +0000 (17:00 +1100)
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/Kconfig

index 17903f1f356be5790d6ddcde1ff3d5eabaf2ed78..684fa6456797df07f6a98d1eabce6d66a8c88f60 100644 (file)
@@ -144,6 +144,7 @@ config PPC
        select HAVE_MOD_ARCH_SPECIFIC
        select MODULES_USE_ELF_RELA
        select CLONE_BACKWARDS
+       select ARCH_USE_BUILTIN_BSWAP
 
 config EARLY_PRINTK
        bool