summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@ezchip.com>2015-10-07 16:29:11 +0300
committerChris Metcalf <cmetcalf@ezchip.com>2015-10-08 18:44:12 +0300
commit7a5692e6e533fd379081ab06fb58f3f5ee4d80bc (patch)
tree1f73791b3ffebda79a9670bef2eb1988d6fba16d /arch
parentc6fa8e6de3dc420cba092bf155b2ed25bcd537f7 (diff)
downloadlinux-7a5692e6e533fd379081ab06fb58f3f5ee4d80bc.tar.xz
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>
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