From: Chris Metcalf Date: Wed, 7 Oct 2015 13:29:11 +0000 (-0400) Subject: arch/powerpc: provide zero_bytemask() for big-endian X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a5692e6e533fd379081ab06fb58f3f5ee4d80bc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Michael Ellerman Signed-off-by: Chris Metcalf --- 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