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>
This commit is contained in:
Chris Metcalf 2015-10-07 09:29:11 -04:00
parent c6fa8e6de3
commit 7a5692e6e5
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ static inline bool has_zero(unsigned long val, unsigned long *data, const struct
return (val + c->high_bits) & ~rhs; return (val + c->high_bits) & ~rhs;
} }
static inline unsigned long zero_bytemask(unsigned long mask)
{
return ~1ul << __fls(mask);
}
#else #else
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT