All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Howells <dhowells@redhat.com>,
	tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/3] X86_64: Optimise fls(), ffs() and fls64()
Date: Fri, 16 Dec 2011 13:57:14 +0000	[thread overview]
Message-ID: <201112161357.14463.arnd@arndb.de> (raw)
In-Reply-To: <4EEA89B6.7030204@zytor.com>

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

  reply	other threads:[~2011-12-16 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13 14:56 [PATCH 1/3] X86_64: Optimise fls(), ffs() and fls64() David Howells
2011-12-13 14:57 ` [PATCH 2/3] Adjust the comment on get_order() to describe the size==0 case David Howells
2011-12-19 18:45   ` H. Peter Anvin
2011-12-19 18:47     ` H. Peter Anvin
2011-12-20 15:09     ` Arnd Bergmann
2011-12-20 15:39       ` David Howells
2012-02-20 21:22         ` H. Peter Anvin
2011-12-20 16:09       ` hpanvin@gmail.com
2011-12-13 14:57 ` [PATCH 3/3] Optimise get_order() David Howells
2011-12-15  0:03 ` [PATCH 1/3] X86_64: Optimise fls(), ffs() and fls64() Linus Torvalds
2011-12-15  0:35   ` David Howells
2011-12-15 18:12   ` H. Peter Anvin
2011-12-15 21:29 ` H. Peter Anvin
2011-12-15 22:43   ` Arnd Bergmann
2011-12-15 23:58     ` H. Peter Anvin
2011-12-16 13:57       ` Arnd Bergmann [this message]
2011-12-16 15:27         ` H. Peter Anvin
2011-12-15 23:01   ` David Howells
2011-12-15 23:26 ` [tip:x86/asm] x86_64, asm: " tip-bot for David Howells

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=201112161357.14463.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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.