Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

David Woodhouse and committed by
Benjamin Herrenschmidt
fe3955cb e49f1e20

+1
+1
arch/powerpc/Kconfig
··· 144 144 select HAVE_MOD_ARCH_SPECIFIC 145 145 select MODULES_USE_ELF_RELA 146 146 select CLONE_BACKWARDS 147 + select ARCH_USE_BUILTIN_BSWAP 147 148 148 149 config EARLY_PRINTK 149 150 bool