projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fa8e6
)
arch/powerpc: provide zero_bytemask() for big-endian
author
Chris Metcalf
<cmetcalf@ezchip.com>
Wed, 7 Oct 2015 13:29:11 +0000
(09:29 -0400)
committer
Chris Metcalf
<cmetcalf@ezchip.com>
Thu, 8 Oct 2015 15:44:12 +0000
(11:44 -0400)
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>
arch/powerpc/include/asm/word-at-a-time.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/include/asm/word-at-a-time.h
b/arch/powerpc/include/asm/word-at-a-time.h
index 5b3a903adae6d761effa550a802ed5d6a2aeb656..e4396a7d0f7cf5627a92ea8c07756aba6bc52c7a 100644
(file)
--- 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