[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [xen-unstable test] 16231: regressions - FAIL



On Tue, 2013-02-26 at 09:54 +0000, Jan Beulich wrote:
> >>> On 26.02.13 at 10:06, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > This patch fixes the current build breakage, anyone want to ack or nack?
> 
> Looks almost fine to me, but probably one of the other ARM guys
> would want to ack this anyway.

Actually at this point I would rather just get the build fixed, since it
is blocking quite a large staging push.

I'll commit in about half an hour unless someone objects.

> >> --- a/tools/include/xen-foreign/mkheader.py
> >> +++ b/tools/include/xen-foreign/mkheader.py
> >> @@ -20,15 +20,18 @@ footer = {};
> >>  inttypes["arm32"] = {
> >>      "unsigned long" : "uint32_t",
> >>      "long"          : "uint32_t",
> >> -    "xen_pfn_t"     : "uint64_t",
> >> -    "xen_ulong_t"   : "uint64_t",
> >> +    "xen_pfn_t"     : "__align8__ uint64_t",
> >> +    "xen_ulong_t"   : "__align8__ uint64_t",
> >> +    "uint64_t"      : "__align8__ uint64_t",
> >>  };
> >>  header["arm32"] = """
> >>  #define __arm___ARM32 1
> >>  #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
> >>  # define __DECL_REG(n64, n32) union { uint64_t n64; uint32_t n32; }
> >> +# define __align8__ __attribute__((aligned (8)))
> 
> Using __aligned__ here would probably be a tiny bit more safe (I
> do realize that x86-64 already uses the same construct you use).

Yes I copied x86-64 here deliberately.

> >>  #else
> >>  # define __DECL_REG(n64, n32) uint64_t n64
> >> +# define FIXME
> 
> Did you mean
> 
> # define __align8__ FIXME
> 
> (also further down)?

Oh yes, silly me.

Ian.

8<--------------------------------

>From 8a2ab328c96bd71855595633b14fb7adc5cc0cc9 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 25 Feb 2013 09:11:04 +0000
Subject: [PATCH] tools: foreign: ensure 64 bit values are properly aligned for 
arm

When building the foreign headers on x86_32 we use '#pragma pack(4)' and
therefore need to explicitly align types which should be aligned to 8-byte
boundaries.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
v2: Fix #define FIXME -> #define __align8__ FIXME
---
 tools/include/xen-foreign/mkheader.py |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/include/xen-foreign/mkheader.py 
b/tools/include/xen-foreign/mkheader.py
index 8a784d3..b19292f 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -20,15 +20,18 @@ footer = {};
 inttypes["arm32"] = {
     "unsigned long" : "uint32_t",
     "long"          : "uint32_t",
-    "xen_pfn_t"     : "uint64_t",
-    "xen_ulong_t"   : "uint64_t",
+    "xen_pfn_t"     : "__align8__ uint64_t",
+    "xen_ulong_t"   : "__align8__ uint64_t",
+    "uint64_t"      : "__align8__ uint64_t",
 };
 header["arm32"] = """
 #define __arm___ARM32 1
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 # define __DECL_REG(n64, n32) union { uint64_t n64; uint32_t n32; }
+# define __align8__ __attribute__((aligned (8)))
 #else
 # define __DECL_REG(n64, n32) uint64_t n64
+# define __align8__ FIXME
 #endif
 """;
 footer["arm32"] = """
@@ -38,15 +41,18 @@ footer["arm32"] = """
 inttypes["arm64"] = {
     "unsigned long" : "__danger_unsigned_long_on_arm64",
     "long"          : "__danger_long_on_arm64",
-    "xen_pfn_t"     : "uint64_t",
-    "xen_ulong_t"   : "uint64_t",
+    "xen_pfn_t"     : "__align8__ uint64_t",
+    "xen_ulong_t"   : "__align8__ uint64_t",
+    "uint64_t"      : "__align8__ uint64_t",
 };
 header["arm64"] = """
 #define __aarch64___ARM64 1
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 # define __DECL_REG(n64, n32) union { uint64_t n64; uint32_t n32; }
+# define __align8__ __attribute__((aligned (8)))
 #else
 # define __DECL_REG(n64, n32) uint64_t n64
+# define __align8__ FIXME
 #endif
 """;
 footer["arm64"] = """
-- 
1.7.2.5





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.