Skip to content

Commit

Permalink
arch/powerpc: provide zero_bytemask() for big-endian
Browse files Browse the repository at this point in the history
For some reason, only the little-endian flavor of
powerpc provided the zero_bytemask() implementation.

Reported-by: Michal Sojka <[email protected]>
Acked-by: Michael Ellerman <[email protected]>
Signed-off-by: Chris Metcalf <[email protected]>
  • Loading branch information
Chris Metcalf committed Oct 8, 2015
1 parent c6fa8e6 commit 7a5692e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/include/asm/word-at-a-time.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a5692e

Please sign in to comment.