summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-05-21 12:33:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-03 09:53:56 +0200
commite4daf808818f040801e2416d96e77d7ac9f64acc (patch)
tree26216e7a49d063a6cdd668701c9170aa6ea334f0 /arch
parent28a91334704f880e6aaeaa2f6b3e6e29a28d500b (diff)
downloadbarebox-e4daf808818f040801e2416d96e77d7ac9f64acc.tar.gz
barebox-e4daf808818f040801e2416d96e77d7ac9f64acc.tar.xz
introduce bitsperlong.h for remaining architectures
This introduces the bitsperlong.h file for the remaining architectures. It's purpose is to define BITS_PER_LONG which in the next step can be used by a generic posix_types.h file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/bitsperlong.h1
-rw-r--r--arch/arm/include/asm/types.h2
-rw-r--r--arch/blackfin/include/asm/types.h2
-rw-r--r--arch/efi/include/asm/bitsperlong.h10
-rw-r--r--arch/efi/include/asm/types.h6
-rw-r--r--arch/openrisc/include/asm/bitsperlong.h1
-rw-r--r--arch/openrisc/include/asm/types.h2
-rw-r--r--arch/ppc/include/asm/bitsperlong.h1
-rw-r--r--arch/ppc/include/asm/types.h2
-rw-r--r--arch/sandbox/include/asm/bitsperlong.h10
-rw-r--r--arch/sandbox/include/asm/types.h2
-rw-r--r--arch/x86/include/asm/bitsperlong.h1
-rw-r--r--arch/x86/include/asm/types.h2
13 files changed, 31 insertions, 11 deletions
diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..6dc0bb0c13
--- /dev/null
+++ b/arch/arm/include/asm/bitsperlong.h
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index 680e824876..1a7f47add0 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -31,7 +31,7 @@ typedef unsigned long long __u64;
*/
#ifdef __KERNEL__
-#define BITS_PER_LONG 32
+#include <asm/bitsperlong.h>
#ifndef __ASSEMBLY__
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h
index f1c2dc43c6..e9d73377eb 100644
--- a/arch/blackfin/include/asm/types.h
+++ b/arch/blackfin/include/asm/types.h
@@ -73,6 +73,6 @@ typedef unsigned long long u64;
#endif /* __ASSEMBLY__ */
-#define BITS_PER_LONG 32
+#include <asm/bitsperlong.h>
#endif
diff --git a/arch/efi/include/asm/bitsperlong.h b/arch/efi/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..00c1fc2625
--- /dev/null
+++ b/arch/efi/include/asm/bitsperlong.h
@@ -0,0 +1,10 @@
+#ifndef __ASM_BITSPERLONG_H
+#define __ASM_BITSPERLONG_H
+
+#ifdef __x86_64__
+#define BITS_PER_LONG 64
+#else
+#define BITS_PER_LONG 32
+#endif
+
+#endif /* __ASM_BITSPERLONG_H */
diff --git a/arch/efi/include/asm/types.h b/arch/efi/include/asm/types.h
index 05122ea04e..3caac398d8 100644
--- a/arch/efi/include/asm/types.h
+++ b/arch/efi/include/asm/types.h
@@ -56,11 +56,7 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#ifdef __x86_64__
-#define BITS_PER_LONG 64
-#else
-#define BITS_PER_LONG 32
-#endif
+#include <asm/bitsperlong.h>
#endif /* __KERNEL__ */
diff --git a/arch/openrisc/include/asm/bitsperlong.h b/arch/openrisc/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..6dc0bb0c13
--- /dev/null
+++ b/arch/openrisc/include/asm/bitsperlong.h
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/arch/openrisc/include/asm/types.h b/arch/openrisc/include/asm/types.h
index cacda424ba..5b6391baf0 100644
--- a/arch/openrisc/include/asm/types.h
+++ b/arch/openrisc/include/asm/types.h
@@ -62,7 +62,7 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
+#include <asm/bitsperlong.h>
#endif /* __KERNEL__ */
diff --git a/arch/ppc/include/asm/bitsperlong.h b/arch/ppc/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..6dc0bb0c13
--- /dev/null
+++ b/arch/ppc/include/asm/bitsperlong.h
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/arch/ppc/include/asm/types.h b/arch/ppc/include/asm/types.h
index 37ef3530ab..6eb3877032 100644
--- a/arch/ppc/include/asm/types.h
+++ b/arch/ppc/include/asm/types.h
@@ -39,7 +39,7 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
+#include <asm-generic/bitsperlong.h>
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
diff --git a/arch/sandbox/include/asm/bitsperlong.h b/arch/sandbox/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..00c1fc2625
--- /dev/null
+++ b/arch/sandbox/include/asm/bitsperlong.h
@@ -0,0 +1,10 @@
+#ifndef __ASM_BITSPERLONG_H
+#define __ASM_BITSPERLONG_H
+
+#ifdef __x86_64__
+#define BITS_PER_LONG 64
+#else
+#define BITS_PER_LONG 32
+#endif
+
+#endif /* __ASM_BITSPERLONG_H */
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 8944b47fd9..501883f5aa 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -54,7 +54,7 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
+#include <asm/bitsperlong.h>
#endif /* __KERNEL__ */
diff --git a/arch/x86/include/asm/bitsperlong.h b/arch/x86/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..6dc0bb0c13
--- /dev/null
+++ b/arch/x86/include/asm/bitsperlong.h
@@ -0,0 +1 @@
+#include <asm-generic/bitsperlong.h>
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index b3fd1f644b..d60612ff74 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -41,7 +41,7 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-#define BITS_PER_LONG 32
+#include <asm-generic/bitsperlong.h>
#endif /* __ASSEMBLY__ */