From: jschopp <jschopp@austin.ibm.com>
To: Jon Mason <jdmason@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] remove powerpc bitops infavor of existing generic bitops
Date: Mon, 15 May 2006 15:42:10 -0500 [thread overview]
Message-ID: <4468E7A2.4050002@austin.ibm.com> (raw)
In-Reply-To: <20060515203815.GC17646@us.ibm.com>
> Ah but here's the trick, there is the same explicit call to ppc
> assembly. The only function in the file removed is this one you pointed
> out, and the only caller of this function is ext2_ffz. And the only
> user of ext2_ffz is find_next_zero_le_bit.
>
> Now the generic code is very similar to the file removed (`diff -Narup
> arch/powerpc/lib/bitops.c lib/find_next_bit.c` to see for yourself). In
> the same place where ext2_ffz is called, ffz is called in the generic
> code. Now if we look at the definition of ffz in
> include/asm-powerpc/bitops.h, we see it calls __ilog2 of that same file.
> __ilog2 is defined as:
>
> static __inline__ int __ilog2(unsigned long x)
> {
> int lz;
>
> asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r" (x));
> return BITS_PER_LONG - 1 - lz;
> }
>
> So, its really the same code :)
Good explination. I'm convinced, so for what it's worth:
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
next prev parent reply other threads:[~2006-05-15 21:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 18:01 [PATCH] remove powerpc bitops infavor of existing generic bitops Jon Mason
2006-05-15 19:56 ` jschopp
2006-05-15 20:38 ` Jon Mason
2006-05-15 20:42 ` jschopp [this message]
2006-05-19 5:00 ` Paul Mackerras
2006-05-19 20:35 ` Jon Mason
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=4468E7A2.4050002@austin.ibm.com \
--to=jschopp@austin.ibm.com \
--cc=jdmason@us.ibm.com \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.