mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 03/14] introduce bitsperlong.h for remaining architectures
Date: Fri, 22 May 2015 08:11:00 +0200	[thread overview]
Message-ID: <1432275071-28554-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1432275071-28554-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 arch/arm/include/asm/bitsperlong.h      |  1 +
 arch/arm/include/asm/types.h            |  2 +-
 arch/blackfin/include/asm/types.h       |  2 +-
 arch/efi/include/asm/bitsperlong.h      | 10 ++++++++++
 arch/efi/include/asm/types.h            |  6 +-----
 arch/openrisc/include/asm/bitsperlong.h |  1 +
 arch/openrisc/include/asm/types.h       |  2 +-
 arch/ppc/include/asm/bitsperlong.h      |  1 +
 arch/ppc/include/asm/types.h            |  2 +-
 arch/sandbox/include/asm/bitsperlong.h  | 10 ++++++++++
 arch/sandbox/include/asm/types.h        |  2 +-
 arch/x86/include/asm/bitsperlong.h      |  1 +
 arch/x86/include/asm/types.h            |  2 +-
 13 files changed, 31 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/include/asm/bitsperlong.h
 create mode 100644 arch/efi/include/asm/bitsperlong.h
 create mode 100644 arch/openrisc/include/asm/bitsperlong.h
 create mode 100644 arch/ppc/include/asm/bitsperlong.h
 create mode 100644 arch/sandbox/include/asm/bitsperlong.h
 create mode 100644 arch/x86/include/asm/bitsperlong.h

diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h
new file mode 100644
index 0000000..6dc0bb0
--- /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 680e824..1a7f47a 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 f1c2dc4..e9d7337 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 0000000..00c1fc2
--- /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 05122ea..3caac39 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 0000000..6dc0bb0
--- /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 cacda42..5b6391b 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 0000000..6dc0bb0
--- /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 37ef353..6eb3877 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 0000000..00c1fc2
--- /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 8944b47..7590a39 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-generic/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 0000000..6dc0bb0
--- /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 b3fd1f6..d60612f 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__ */
 
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-05-22  6:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  6:10 Introduce asm-generic/posix_types.h Sascha Hauer
2015-05-22  6:10 ` [PATCH 01/14] dma: Use generic place for dma_addr_t typedef Sascha Hauer
2015-05-22  6:10 ` [PATCH 02/14] drop __BITS_PER_LONG Sascha Hauer
2015-05-22  6:11 ` Sascha Hauer [this message]
2015-05-22  6:11 ` [PATCH 04/14] introduce generic posix_types.h Sascha Hauer
2015-05-22  6:11 ` [PATCH 05/14] remove unused nlink_t Sascha Hauer
2015-05-22  6:11 ` [PATCH 06/14] ARM: use generic posix_types.h Sascha Hauer
2015-05-22  6:11 ` [PATCH 07/14] blackfin: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 08/14] x86: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 09/14] openrisc: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 10/14] mips: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 11/14] ppc: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 12/14] sandbox: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 13/14] efi: " Sascha Hauer
2015-05-22  6:11 ` [PATCH 14/14] nios2: " Sascha Hauer

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=1432275071-28554-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox