]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Implement __arch_bitrev* using bitswap for MIPSr6
authorPaul Burton <paul.burton@imgtec.com>
Fri, 6 May 2016 12:35:03 +0000 (13:35 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:17 +0000 (14:02 +0200)
commit934df188cfadb11bf21d1a067ec83bdb8a9ac562
tree4a3de3864e8ccbaaa15417001e7a8fd2d5d7edcb
parent72ded678580ab9edb5c246bc3d97386f19e3bcec
MIPS: Implement __arch_bitrev* using bitswap for MIPSr6

Release 6 of the MIPS architecture introduced the bitswap instruction,
which reverses the bits within each byte of a word. Make use of this
instruction to implement the __arch_bitrev* functions, which should be
faster for most MIPSr6 CPUs, reduces code size slightly and allows us to
avoid the lookup table used by the generic implementation, saving 256
bytes in the kernel binary by dropping that.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13204/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/include/asm/bitrev.h [new file with mode: 0644]