All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhaoxiu Zeng <zengzhaoxiu@163.com>
To: Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org
Cc: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>,
	Steven Miao <realmz6@gmail.com>,
	adi-buildroot-devel@lists.sourceforge.net
Subject: Re: [PATCH V3] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions
Date: Sat, 16 Apr 2016 00:18:43 +0800	[thread overview]
Message-ID: <57111463.9090109@163.com> (raw)
In-Reply-To: <1460736514.19090.32.camel@perches.com>

在 2016/4/16 0:08, Joe Perches 写道:
> On Fri, 2016-04-15 at 23:20 +0800, zengzhaoxiu@163.com wrote:
>> From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
>>
>> blackfin has popcount instruction (ONES), we can do the efficient
>> computing (ffz, __ffs, ffs, __fls, and fls) use this instruction.
> []
>> diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
> []
>> +static inline unsigned int __arch_hweight64(__u64 w)
>> +{
>> +	return __arch_hweight32((unsigned int)(w >> 32)) +
>> +	       __arch_hweight32((unsigned int)w);
>> +}
> trivia:  perhaps this is more readable as:
>
> 	return __arch_hweight32(upper_32_bits(w)) +
> 	       __arch_hweight32(lower_32_bits(w));
>
>

Yes.
I just moved these codes from the bottom of  bitops.h, didn't change anything.

      reply	other threads:[~2016-04-15 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  7:52 [PATCH] blackfin: optimize ffz, __ffs, ffs, __fls, and fls functions zengzhaoxiu
2016-04-15  8:23 ` [PATCH V2] " zengzhaoxiu
2016-04-15  9:16 ` [PATCH] " kbuild test robot
2016-04-15 15:20 ` [PATCH V3] " zengzhaoxiu
2016-04-15 16:08   ` Joe Perches
2016-04-15 16:18     ` Zhaoxiu Zeng [this message]

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=57111463.9090109@163.com \
    --to=zengzhaoxiu@163.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=realmz6@gmail.com \
    --cc=zhaoxiu.zeng@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 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.