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:
parent
c6fa8e6de3
commit
7a5692e6e5
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue