[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] X86_64: Optimise fls(), ffs() and fls64()



On Thursday 15 December 2011, H. Peter Anvin wrote:
> On 12/15/2011 02:43 PM, Arnd Bergmann wrote:
> > On Thursday 15 December 2011 13:29:07 H. Peter Anvin wrote:
> >> On 12/13/2011 06:56 AM, David Howells wrote:
> >>>  
> >>> +#if BITS_PER_LONG == 32
> >>>  #include <asm-generic/bitops/fls64.h>
> >>> +#endif
> >>>  
> >>
> >> This is outside __KERNEL__, and thus ends up changing what is exported
> >> to userspace (specifically, fls64.h won't be included for 64-bit
> >> non-__KERNEL__ anymore.)  Is this a bug?
> > 
> > Not sure, but I think it's a bug to use BITS_PER_LONG rather than
> > __BITS_PER_LONG outside of __KERNEL__.
> > 
> 
> Yes, it's one of many issues with this stuff.  After tracking down
> things a bit further it looks like this was simply a conversion error in
> checkin:
> 
> d57594c203b1 bitops: use __fls for fls64 on 64-bit archs

Hmm, I also looked a bit closer and noticed that we don't actually
export any bitops headers to user space, so any use of __KERNEL__ in
those headers is bogus, but I don't think there is an actual bug here.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Photo]     [Yosemite]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]


  Powered by Linux