diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-10 01:01:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-10 01:01:26 (GMT) |
commit | 71419b7b8484531626251d56aa6d48d90e646df1 (patch) | |
tree | 41f366547d5afa8e6d4446db451855b9951ef736 | |
parent | f4ba1cf8a40bc9f136f8e050e79a81112bf02ccd (diff) | |
parent | 7a5692e6e533fd379081ab06fb58f3f5ee4d80bc (diff) | |
download | linux-71419b7b8484531626251d56aa6d48d90e646df1.tar.xz |
Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull strscpy powerpc fix from Chris Metcalf.
Fix powerpc big-endian build.
* 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/powerpc: provide zero_bytemask() for big-endian
-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 5b3a903..e4396a7 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 |