From: Ian Campbell Subject: [PATCH 2/4] xen: event channel arrays are xen_ulong_t and not unsigned long Date: Thu, 14 Feb 2013 14:16:12 +0000 Message-ID: <1360851374-28326-2-git-send-email-ian.campbell@citrix.com> References: <1360851324.20449.396.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360851324.20449.396.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: "Keir (Xen.org)" , Ian Campbell , Konrad Rzeszutek Wilk , Stefano Stabellini , Tim Deegan , Jan Beulich List-Id: xen-devel@lists.xenproject.org On ARM we want these to be the same size on 32- and 64-bit. This is an ABI change on ARM. X86 does not change. Signed-off-by: Ian Campbell Cc: Jan Beulich Cc: Keir (Xen.org) Cc: Tim Deegan Cc: Stefano Stabellini Cc: Konrad Rzeszutek Wilk --- tools/include/xen-foreign/mkheader.py | 4 +++- xen/include/public/xen.h | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index c8af7a1..685ab8e 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -21,17 +21,18 @@ inttypes["arm32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint64_t", + "xen_ulong_t" : "uint64_t", }; header["x86_32"] = """ #define __arm__ARM32 1 """; - # x86_32 inttypes["x86_32"] = { "unsigned long" : "uint32_t", "long" : "uint32_t", "xen_pfn_t" : "uint32_t", + "xen_ulong_t" : "uint32_t", }; header["x86_32"] = """ #define __i386___X86_32 1 @@ -46,6 +47,7 @@ inttypes["x86_64"] = { "unsigned long" : "__align8__ uint64_t", "long" : "__align8__ uint64_t", "xen_pfn_t" : "__align8__ uint64_t", + "xen_ulong_t" : "__align8__ uint64_t", }; header["x86_64"] = """ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index 5593066..99c8212 100644 --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -556,7 +556,7 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_t); * Event channel endpoints per domain: * 1024 if a long is 32 bits; 4096 if a long is 64 bits. */ -#define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64) +#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64) struct vcpu_time_info { /* @@ -613,7 +613,7 @@ struct vcpu_info { */ uint8_t evtchn_upcall_pending; uint8_t evtchn_upcall_mask; - unsigned long evtchn_pending_sel; + xen_ulong_t evtchn_pending_sel; struct arch_vcpu_info arch; struct vcpu_time_info time; }; /* 64 bytes (x86) */ @@ -663,8 +663,8 @@ struct shared_info { * per-vcpu selector word to be set. Each bit in the selector covers a * 'C long' in the PENDING bitfield array. */ - unsigned long evtchn_pending[sizeof(unsigned long) * 8]; - unsigned long evtchn_mask[sizeof(unsigned long) * 8]; + xen_ulong_t evtchn_pending[sizeof(xen_ulong_t) * 8]; + xen_ulong_t evtchn_mask[sizeof(xen_ulong_t) * 8]; /* * Wallclock time: updated only by control software. Guests should base -- 1.7.2.5