[parisc-linux] a fast fls also for 2.6?

Joel Soete joel.soete@tiscali.be
Fri, 05 Sep 2003 19:54:42 +0000


Grant Grundler wrote:

>On Fri, Sep 05, 2003 at 12:26:21PM -0600, Grant Grundler wrote:
>  
>
>>>Without any remark, I don't know if you could also be interested to 
>>>include it in 2.6.
>>>      
>>>
>>no - becuase fls() and ffs() return the same values for given input.
>>(I see comments in include/asm-ppc/bitops.h to that effect).
>>    
>>
>
>James Bottomley privately corrected me. fls() != ffs().
>fls() returns most significant bit set.
>
>The examples provided:
>	* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
>
>have the same value for ffs() and fls(). I didn't read the rest.
>Good examples for showing bit numbering though.
>
>I'll work on adding 64-bit support to your __fls() and commit that.
>
Thanks a lot :) (it just make me happy to be usefull)

>
>sorry for the confusion,
>
Please, don't be sorry, I am frequently the first confusing thought ;)

Cheers,
    Joel