word-at-a-time: provide generic big-endian zero_bytemask implementation
authorWill Deacon <will.deacon@arm.com>
Thu, 12 Dec 2013 17:40:22 +0000 (17:40 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 21 May 2014 16:59:13 +0000 (17:59 +0100)
commite73d8c4d6e68f2ed2d1496c4debeb765f057424d
treed51b279e19072c68cd54bd912ac008a08cf5165a
parent68f0f007e6ebd2e6bed5ae5b089b70ab723d76d3
word-at-a-time: provide generic big-endian zero_bytemask implementation

Whilst architectures may be able to do better than this (which they can,
by simply defining their own macro), this is a generic stab at a
zero_bytemask implementation for the asm-generic, big-endian
word-at-a-time implementation.

On arm64, a clz instruction is used to implement the fls efficiently.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 11ec50caedb56e3a87715edeff6a1852e6ae5416)
Signed-off-by: Mark Brown <broonie@linaro.org>
include/asm-generic/word-at-a-time.h