lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <1444229188-19640-1-git-send-email-cmetcalf@ezchip.com> Date: Wed, 7 Oct 2015 10:46:28 -0400 From: Chris Metcalf <cmetcalf@...hip.com> To: Michal Sojka <sojkam1@....cvut.cz>, Ingo Molnar <mingo@...nel.org>, "Linus Torvalds" <torvalds@...ux-foundation.org>, "H. Peter Anvin" <hpa@...or.com>, Philippe Bergheaud <felix@...ux.vnet.ibm.com>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Paul Mackerras <paulus@...ba.org>, "Michael Ellerman" <mpe@...erman.id.au>, "David S. Miller" <davem@...emloft.net>, "Anton Blanchard" <anton@...ba.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> CC: Chris Metcalf <cmetcalf@...hip.com> Subject: [PATCH] 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@....cvut.cz> Signed-off-by: Chris Metcalf <cmetcalf@...hip.com> --- arch/powerpc/include/asm/word-at-a-time.h | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists