summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-10-10 04:01:26 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-10-10 04:01:26 +0300
commit71419b7b8484531626251d56aa6d48d90e646df1 (patch)
tree41f366547d5afa8e6d4446db451855b9951ef736 /arch
parentf4ba1cf8a40bc9f136f8e050e79a81112bf02ccd (diff)
parent7a5692e6e533fd379081ab06fb58f3f5ee4d80bc (diff)
downloadlinux-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
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/word-at-a-time.h5
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 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