summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-10-10 03:01:26 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-10-10 03:01:26 +0200
commit71419b7b8484531626251d56aa6d48d90e646df1 (patch)
tree41f366547d5afa8e6d4446db451855b9951ef736 /arch
parentMerge tag 'sound-4.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ti... (diff)
parentarch/powerpc: provide zero_bytemask() for big-endian (diff)
downloadlinux-71419b7b8484531626251d56aa6d48d90e646df1.tar.xz
linux-71419b7b8484531626251d56aa6d48d90e646df1.zip
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