From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [Patch] 2/2 fix in machvec.h
Date: Mon, 24 Feb 2003 18:21:14 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805918@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
IA64 ABI specifies that globals > 8 bytes need to be aligned to 16 bytes. gcc doesn't follow this convention. Current kernel code will fail to work with a compiler which follows the ABI.
size of structure ia64_machine_vector is > 8 bytes and not multiple of 16 bytes. When we have CONFIG_IA64_GENERIC, each machine specific vector from different object files gets linked into a user defined section(forming array of structures).
Now with a compiler conforming to ABI, there will be holes in this array resulting in the code failure when it goes through this array of structures.
Following patch will make the size of the structure to be multiple of 16 bytes, making both ABI confirming/non-conforming compilers happy.
thanks,
suresh
--- linux/include/asm-ia64/machvec.h~ Thu Feb 20 13:51:48 2003
+++ linux/include/asm-ia64/machvec.h Thu Feb 20 13:59:35 2003
@@ -113,6 +113,11 @@
# define platofrm_mmiob ia64_mv.mmiob
# endif
+/* __attribute__((__aligned__(16))) is required to make size of the
+ * structure multiple of 16 bytes.
+ * This will fillup the holes created because of section 3.3.1 in
+ * Software Conventions guide.
+ */
struct ia64_machine_vector {
const char *name;
ia64_mv_setup_t *setup;
@@ -145,7 +150,7 @@
ia64_mv_outw_t *outw;
ia64_mv_outl_t *outl;
ia64_mv_mmiob_t *mmiob;
-};
+} __attribute__((__aligned__(16)));
#define MACHVEC_INIT(name) \
{ \
[-- Attachment #2: machvec.diff --]
[-- Type: application/octet-stream, Size: 692 bytes --]
--- linux/include/asm-ia64/machvec.h~ Thu Feb 20 13:51:48 2003
+++ linux/include/asm-ia64/machvec.h Thu Feb 20 13:59:35 2003
@@ -113,6 +113,11 @@
# define platofrm_mmiob ia64_mv.mmiob
# endif
+/* __attribute__((__aligned__(16))) is required to make size of the
+ * structure multiple of 16 bytes.
+ * This will fillup the holes created because of section 3.3.1 in
+ * Software Conventions guide.
+ */
struct ia64_machine_vector {
const char *name;
ia64_mv_setup_t *setup;
@@ -145,7 +150,7 @@
ia64_mv_outw_t *outw;
ia64_mv_outl_t *outl;
ia64_mv_mmiob_t *mmiob;
-};
+} __attribute__((__aligned__(16)));
#define MACHVEC_INIT(name) \
{ \
next reply other threads:[~2003-02-24 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-24 18:21 Siddha, Suresh B [this message]
2003-02-24 20:30 ` [Linux-ia64] [Patch] 2/2 fix in machvec.h Jim Wilson
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=marc-linux-ia64-105590709805918@msgid-missing \
--to=suresh.b.siddha@intel.com \
--cc=linux-ia64@vger.kernel.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