From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Cc: Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 1/5] linux/types: import __aligned_x64 from the kernel
Date: Fri, 15 Feb 2013 14:35:13 +0100 [thread overview]
Message-ID: <1360935317-7386-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20130215125941.GB19322@game.jcrosoft.org>
need it by upcoming EFI GPT support
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
include/linux/types.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/linux/types.h b/include/linux/types.h
index 76c6b67..14f8315 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -142,6 +142,19 @@ typedef __u64 __bitwise __be64;
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
+/*
+ * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
+ * common 32/64-bit compat problems.
+ * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
+ * architectures) and to 8-byte boundaries on 64-bit architectures. The new
+ * aligned_64 type enforces 8-byte alignment so that structs containing
+ * aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
+ * No conversions are necessary between 32-bit user-space and a 64-bit kernel.
+ */
+#define __aligned_u64 __u64 __attribute__((aligned(8)))
+#define __aligned_be64 __be64 __attribute__((aligned(8)))
+#define __aligned_le64 __le64 __attribute__((aligned(8)))
+
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef u64 phys_addr_t;
typedef u64 phys_size_t;
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-02-15 13:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 12:59 [PATCH 0/5 v3] add EFI GUID Partition Table support Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 13:35 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-02-15 13:35 ` [PATCH 2/5] filetype: add GPT support Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 17:32 ` Sascha Hauer
2013-02-15 17:36 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 17:48 ` Sascha Hauer
2013-02-15 13:35 ` [PATCH 3/5] partitons: add framework Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 17:37 ` Sascha Hauer
2013-02-15 13:35 ` [PATCH 4/5] disk: introduce partition name Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 17:43 ` Sascha Hauer
2013-02-16 11:29 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 13:35 ` [PATCH 5/5] disk: partitions: add EFI GUID Partition Table Jean-Christophe PLAGNIOL-VILLARD
2013-02-15 17:46 ` Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2013-02-16 11:38 [PATCH 0/5 v4] add EFI GUID Partition Table support Jean-Christophe PLAGNIOL-VILLARD
2013-02-16 13:47 ` [PATCH 1/5] linux/types: import __aligned_x64 from the kernel Jean-Christophe PLAGNIOL-VILLARD
2013-02-14 22:42 [PATCH 0/5] add EFI GUID Partition Table support Jean-Christophe PLAGNIOL-VILLARD
2013-02-14 22:44 ` [PATCH 1/5] linux/types: import __aligned_x64 from the kernel Jean-Christophe PLAGNIOL-VILLARD
2013-02-14 15:47 [PATCH 0/5] add EFI GUID Partition Table support Jean-Christophe PLAGNIOL-VILLARD
2013-02-14 15:52 ` [PATCH 1/5] linux/types: import __aligned_x64 from the kernel Jean-Christophe PLAGNIOL-VILLARD
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=1360935317-7386-1-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=rob.herring@calxeda.com \
/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