diff options
author | Chris Metcalf <cmetcalf@ezchip.com> | 2015-10-07 15:29:11 +0200 |
---|---|---|
committer | Chris Metcalf <cmetcalf@ezchip.com> | 2015-10-08 17:44:12 +0200 |
commit | 7a5692e6e533fd379081ab06fb58f3f5ee4d80bc (patch) | |
tree | 1f73791b3ffebda79a9670bef2eb1988d6fba16d /arch | |
parent | Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm6... (diff) | |
download | linux-7a5692e6e533fd379081ab06fb58f3f5ee4d80bc.tar.xz linux-7a5692e6e533fd379081ab06fb58f3f5ee4d80bc.zip |
arch/powerpc: provide zero_bytemask() for big-endian
For some reason, only the little-endian flavor of
powerpc provided the zero_bytemask() implementation.
Reported-by: Michal Sojka <sojkam1@fel.cvut.cz>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/word-at-a-time.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h index 5b3a903adae6..e4396a7d0f7c 100644 --- a/arch/powerpc/include/asm/word-at-a-time.h +++ b/arch/powerpc/include/asm/word-at-a-time.h @@ -40,6 +40,11 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct return (val + c->high_bits) & ~rhs; } +static inline unsigned long zero_bytemask(unsigned long mask) +{ + return ~1ul << __fls(mask); +} + #else #ifdef CONFIG_64BIT |