mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>,
	Chris Metcalf <cmetcalf@tilera.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [GIT PULL] core/hweight changes for v2.6.35
Date: Fri, 13 Aug 2010 14:56:32 -0700	[thread overview]
Message-ID: <4C65BF90.6000302@zytor.com> (raw)
In-Reply-To: <AANLkTikvJna6vnc73RVhVAJZ8mERJoFk=V6Nwq-3HHWz@mail.gmail.com>

On 08/13/2010 02:42 PM, Mike Frysinger wrote:
> On Mon, May 17, 2010 at 17:21, Ingo Molnar wrote:
>>  arch/alpha/include/asm/bitops.h            |   18 +++++----
>>  arch/ia64/include/asm/bitops.h             |   11 +++--
>>  arch/sparc/include/asm/bitops_64.h         |   11 +++--
>>  arch/x86/include/asm/bitops.h              |    4 +-
>>  include/asm-generic/bitops/arch_hweight.h  |   25 ++++++++++++
>>  include/asm-generic/bitops/const_hweight.h |   42 ++++++++++++++++++++
>>  include/asm-generic/bitops/hweight.h       |    8 +---
> 
> did this miss Blackfin because the original patch was against the
> 2.6.34 tree ?  just wondering why it now build fails ...
> 
> doing a simple grep shows that the new "tile" arch may also be broken
> as it uses "hweight32" ...
> 
> considering __sw_hweightX only exist when the generic hweight is in
> play, wouldnt it make sense to have
> include/asm-generic/bitops/arch_hweight.h not always define things ?
> then most arches can simply pull in
> include/asm-generic/bitops/hweight.h without having to worry about the
> random inner details of hweight cruft.
> 

__sw_hweightX can exist even when generic hweight isn't in use per se,
because the arch implementation can wrapper the software implementation.
 This is the case on x86, for example -- most x86 CPUs don't have popcnt
yet, so on those the x86 implementation end up calling the
__sw_hweight*() implementations.

	-hpa

  reply	other threads:[~2010-08-13 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 21:21 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 [this message]
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   ` [PATCH] arch/tile: Rename the hweight() implementations to __arch_hweight() Chris Metcalf
2010-08-14  1:02     ` 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=4C65BF90.6000302@zytor.com \
    --to=hpa@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=cmetcalf@tilera.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

Powered by JetHome