From: Chris Metcalf <cmetcalf@ezchip.com>
To: Michal Sojka <sojkam1@fel.cvut.cz>,
Ingo Molnar <mingo@kernel.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Philippe Bergheaud <felix@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"David S. Miller" <davem@davemloft.net>,
"Anton Blanchard" <anton@samba.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Subject: [PATCH] arch/powerpc: provide zero_bytemask() for big-endian
Date: Wed, 7 Oct 2015 10:46:28 -0400 [thread overview]
Message-ID: <1444229188-19640-1-git-send-email-cmetcalf@ezchip.com> (raw)
In-Reply-To: <fd533832-c1b1-4775-90a5-095f397d3a78@email.android.com>
For some reason, only the little-endian flavor of
powerpc provided the zero_bytemask() implementation.
Reported-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Chris Metcalf <cmetcalf@ezchip.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
next prev parent reply other threads:[~2015-10-07 14:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 12:53 error: implicit declaration of function 'zero_bytemask' Michal Sojka
2015-10-07 13:29 ` Chris Metcalf
2015-10-07 13:41 ` Michal Sojka
2015-10-07 14:46 ` Chris Metcalf [this message]
2015-10-08 3:39 ` [PATCH] arch/powerpc: provide zero_bytemask() for big-endian Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444229188-19640-1-git-send-email-cmetcalf@ezchip.com \
--to=cmetcalf@ezchip.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=felix@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=sojkam1@fel.cvut.cz \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®