From: Chris Metcalf <cmetcalf@tilera.com>
To: Borislav Petkov <petkovbb@googlemail.com>,
Mike Frysinger <vapier.adi@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
<linux-kernel@vger.kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] arch/tile: Rename the hweight() implementations to __arch_hweight().
Date: Fri, 13 Aug 2010 20:32:41 -0400 [thread overview]
Message-ID: <201008140039.o7E0dqTq005996@farm-0002.internal.tilera.com> (raw)
In-Reply-To: <AANLkTikvJna6vnc73RVhVAJZ8mERJoFk=V6Nwq-3HHWz@mail.gmail.com>
See commit 1527bc8b928dd1399c3d3467dd47d9ede210978a.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
Mike, thanks for the pointer to the hweight issue. Since we are using
__builtin_popcount() and the compiler can do constant propagation, etc.,
with it at compile-time, this is less critical, but it seems like the
easiest way to get the definitions of the HWEIGHT macros.
arch/tile/include/asm/bitops.h | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h
index 84600f3..6832b4b 100644
--- a/arch/tile/include/asm/bitops.h
+++ b/arch/tile/include/asm/bitops.h
@@ -98,26 +98,27 @@ static inline int fls64(__u64 w)
return (sizeof(__u64) * 8) - __builtin_clzll(w);
}
-static inline unsigned int hweight32(unsigned int w)
+static inline unsigned int __arch_hweight32(unsigned int w)
{
return __builtin_popcount(w);
}
-static inline unsigned int hweight16(unsigned int w)
+static inline unsigned int __arch_hweight16(unsigned int w)
{
return __builtin_popcount(w & 0xffff);
}
-static inline unsigned int hweight8(unsigned int w)
+static inline unsigned int __arch_hweight8(unsigned int w)
{
return __builtin_popcount(w & 0xff);
}
-static inline unsigned long hweight64(__u64 w)
+static inline unsigned long __arch_hweight64(__u64 w)
{
return __builtin_popcountll(w);
}
+#include <asm-generic/bitops/const_hweight.h>
#include <asm-generic/bitops/lock.h>
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/ext2-non-atomic.h>
--
1.6.5.2
next prev parent reply other threads:[~2010-08-14 0:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 21:21 [GIT PULL] core/hweight changes for v2.6.35 Ingo Molnar
2010-05-17 21:46 ` Linus Torvalds
2010-05-17 22:06 ` H. Peter Anvin
2010-05-17 22:57 ` [tip:core/hweight] x86, hweight: Use a 32-bit popcnt for __arch_hweight32() tip-bot for H. Peter Anvin
2010-05-17 23:04 ` [GIT PULL] UPDATED - core/hweight changes for v2.6.35 H. Peter Anvin
2010-08-13 21:42 ` [GIT PULL] " Mike Frysinger
2010-08-13 21:56 ` H. Peter Anvin
2010-08-13 21:59 ` Mike Frysinger
2010-08-14 0:11 ` H. Peter Anvin
2010-08-14 13:44 ` Borislav Petkov
2010-08-14 0:32 ` Chris Metcalf [this message]
2010-08-14 1:02 ` [PATCH] arch/tile: Rename the hweight() implementations to __arch_hweight() Mike Frysinger
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=201008140039.o7E0dqTq005996@farm-0002.internal.tilera.com \
--to=cmetcalf@tilera.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=petkovbb@googlemail.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vapier.adi@gmail.com \
/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®