From: "tip-bot for H. Peter Anvin" <hpa@linux.intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
shemminger@vyatta.com, dhowells@redhat.com,
heukelum@mailshack.com, tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/asm] x86, bitops: Move fls64.h inside __KERNEL__
Date: Thu, 15 Dec 2011 15:25:21 -0800 [thread overview]
Message-ID: <tip-83d99df7c4bf37176d8c7b199e3b129a51fa04c8@git.kernel.org> (raw)
In-Reply-To: <4EEA77E1.6050009@zytor.com>
Commit-ID: 83d99df7c4bf37176d8c7b199e3b129a51fa04c8
Gitweb: http://git.kernel.org/tip/83d99df7c4bf37176d8c7b199e3b129a51fa04c8
Author: H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Thu, 15 Dec 2011 14:55:53 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 15 Dec 2011 15:04:07 -0800
x86, bitops: Move fls64.h inside __KERNEL__
We would include <asm-generic/bitops/fls64.h> even without __KERNEL__,
but that doesn't make sense, as:
1. That file provides fls64(), but the corresponding function fls() is
not exported to user space.
2. The implementation of fls64.h uses kernel-only symbols.
3. fls64.h is not exported to user space.
This appears to have been a bug introduced in checkin:
d57594c203b1 bitops: use __fls for fls64 on 64-bit archs
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Alexander van Heukelum <heukelum@mailshack.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/4EEA77E1.6050009@zytor.com
---
arch/x86/include/asm/bitops.h | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 1775d6e..4a6235b 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -380,6 +380,8 @@ static inline unsigned long __fls(unsigned long word)
return word;
}
+#undef ADDR
+
#ifdef __KERNEL__
/**
* ffs - find first set bit in word
@@ -434,11 +436,6 @@ static inline int fls(int x)
#endif
return r + 1;
}
-#endif /* __KERNEL__ */
-
-#undef ADDR
-
-#ifdef __KERNEL__
#include <asm-generic/bitops/find.h>
@@ -450,12 +447,8 @@ static inline int fls(int x)
#include <asm-generic/bitops/const_hweight.h>
-#endif /* __KERNEL__ */
-
#include <asm-generic/bitops/fls64.h>
-#ifdef __KERNEL__
-
#include <asm-generic/bitops/le.h>
#include <asm-generic/bitops/ext2-atomic-setbit.h>
prev parent reply other threads:[~2011-12-15 23:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 22:42 x86: fls64() exported to user space but not fls()? H. Peter Anvin
2011-12-15 23:25 ` tip-bot for H. Peter Anvin [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=tip-83d99df7c4bf37176d8c7b199e3b129a51fa04c8@git.kernel.org \
--to=hpa@linux.intel.com \
--cc=dhowells@redhat.com \
--cc=heukelum@mailshack.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=shemminger@vyatta.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome