summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-05-21 12:23:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-22 08:00:48 +0200
commit28a91334704f880e6aaeaa2f6b3e6e29a28d500b (patch)
tree1b98cc71f0c24ee7370ef0fab19efb755e9c4ba6 /include
parent9e7d9a5f2ac5dd56e5b3718ea44049907170898b (diff)
downloadbarebox-28a91334704f880e6aaeaa2f6b3e6e29a28d500b.tar.gz
barebox-28a91334704f880e6aaeaa2f6b3e6e29a28d500b.tar.xz
drop __BITS_PER_LONG
The kernel has __BITS_PER_LONG and BITS_PER_LONG. The formaer is needed for architectures which support 32bit userspace on a 64bit kernel. This is not relevant for barebox, so drop __BITS_PER_LONG and use BITS_PER_LONG only. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/bitsperlong.h22
-rw-r--r--include/asm-generic/swab.h2
2 files changed, 1 insertions, 23 deletions
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h
index 4ae54e07de..bb98650298 100644
--- a/include/asm-generic/bitsperlong.h
+++ b/include/asm-generic/bitsperlong.h
@@ -1,32 +1,10 @@
#ifndef __ASM_GENERIC_BITS_PER_LONG
#define __ASM_GENERIC_BITS_PER_LONG
-/*
- * There seems to be no way of detecting this automatically from user
- * space, so 64 bit architectures should override this in their
- * bitsperlong.h. In particular, an architecture that supports
- * both 32 and 64 bit user space must not rely on CONFIG_64BIT
- * to decide it, but rather check a compiler provided macro.
- */
-#ifndef __BITS_PER_LONG
-#define __BITS_PER_LONG 32
-#endif
-
-#ifdef __KERNEL__
-
#ifdef CONFIG_64BIT
#define BITS_PER_LONG 64
#else
#define BITS_PER_LONG 32
#endif /* CONFIG_64BIT */
-/*
- * FIXME: The check currently breaks x86-64 build, so it's
- * temporarily disabled. Please fix x86-64 and reenable
- */
-#if 0 && BITS_PER_LONG != __BITS_PER_LONG
-#error Inconsistent word size. Check asm/bitsperlong.h
-#endif
-
-#endif /* __KERNEL__ */
#endif /* __ASM_GENERIC_BITS_PER_LONG */
diff --git a/include/asm-generic/swab.h b/include/asm-generic/swab.h
index a8e9029d9e..3ab5add54f 100644
--- a/include/asm-generic/swab.h
+++ b/include/asm-generic/swab.h
@@ -9,7 +9,7 @@
* valid if the compiler supports 64 bit data types.
*/
-#if __BITS_PER_LONG == 32
+#if BITS_PER_LONG == 32
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
#define __SWAB_64_THRU_32__
#endif