linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Alexander van Heukelum" <heukelum@fastmail.fm>
To: "Ingo Molnar" <mingo@elte.hu>, "Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, linux-next@vger.kernel.org,
	Paul Mackerras <paulus@samba.org>
Subject: Re: linux-next: x86-latest/powerpc-next merge conflict
Date: Mon, 21 Apr 2008 13:19:50 +0200	[thread overview]
Message-ID: <1208776790.4613.1248992953@webmail.messagingengine.com> (raw)
In-Reply-To: <20080421095102.GB1666@elte.hu>

On Mon, 21 Apr 2008 11:51:02 +0200, "Ingo Molnar" <mingo@elte.hu> said:
> 
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > Today's linux-next merge of the x86-latest tree got a conflict in 
> > include/asm-powerpc/bitops.h between commit 
> > cd008c0f03f3d451e5fbd108b8e74079d402be64 ("generic: implement __fls on 
> > all 64-bit archs") from the x86-latest tree and commit 
> > 9f264be6101c42cb9e471c58322fb83a5cde1461 ("[POWERPC] Optimize fls64() 
> > on 64-bit processors") from the powerpc-next tree.  The fixup was not 
> > quite trivial and is worth a look to see if I got it right.

Powerpc would pick up an optimized version via this chain: generic fls64
->
powerpc __fls --> __ilog2 --> asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r"
(x)).
However, the generic version of fls64 first tests the argument for zero.
From
your code I derive that the count-leading-zeroes instruction for
argument zero
is defined as cntlzl(0) == BITS_PER_LONG. In that case the explicit test
for zero is not needed, which makes the powerpc-specific one added here
an improvement over the generic one.

I've tried to take a look if you got it right, but the linux-next tree
on git.kernel.org is 5 days old. If that's the current state then it's
not merged right ;).

Greetings,
    Alexander

> Paul, do you agree with those generic bitops changes? Just in case it's 
> not obvious from previous discussions: we'll push them upstream via a 
> separate pull request, not via usual x86.git changes. They originated 
> from x86.git but grew into a more generic improvement for all. They sit 
> in x86.git for tester convenience but are of course not pure x86 changes 
> anymore.
> 
> 	Ingo
-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

  reply	other threads:[~2008-04-21 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21  9:12 linux-next: x86-latest/powerpc-next merge conflict Stephen Rothwell
2008-04-21  9:51 ` Ingo Molnar
2008-04-21 11:19   ` Alexander van Heukelum [this message]
2008-04-21 11:30     ` Alexander van Heukelum
2008-04-21 12:13     ` Paul Mackerras
2008-04-21 13:07       ` Alexander van Heukelum
2008-04-21 13:36         ` Gabriel Paubert
2008-04-21 14:19           ` Alexander van Heukelum
2008-04-21 12:10   ` Paul Mackerras

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=1208776790.4613.1248992953@webmail.messagingengine.com \
    --to=heukelum@fastmail.fm \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).