From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756194Ab3BURSp (ORCPT ); Thu, 21 Feb 2013 12:18:45 -0500 Received: from smtp.eu.citrix.com ([46.33.159.39]:18422 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754625Ab3BURQE (ORCPT ); Thu, 21 Feb 2013 12:16:04 -0500 X-IronPort-AV: E=Sophos;i="4.84,710,1355097600"; d="scan'208";a="1744925" Message-ID: <1361466961.26546.85.camel@zakaz.uk.xensource.com> Subject: Re: [PATCH XEN] xen: event channel arrays are xen_ulong_t and not unsigned long From: Ian Campbell To: "xen-devel@lists.xen.org" CC: "linux-kernel@vger.kernel.org" , "Jan Beulich" , "Keir (Xen.org)" , "Tim (Xen.org)" , Stefano Stabellini , Konrad Rzeszutek Wilk , "linux-arm-kernel@lists.infradead.org" Date: Thu, 21 Feb 2013 17:16:01 +0000 In-Reply-To: <1361285363-27133-1-git-send-email-ian.campbell@citrix.com> References: <1361285327.1051.115.camel@zakaz.uk.xensource.com> <1361285363-27133-1-git-send-email-ian.campbell@citrix.com> Organization: Citrix Systems, Inc. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2013-02-19 at 14:49 +0000, Ian Campbell wrote: > 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) Are you guys (un)happy with this change from the Xen & x86 side? > Cc: Tim Deegan > Cc: Stefano Stabellini > Cc: Konrad Rzeszutek Wilk > Cc: linux-arm-kernel@lists.infradead.org > Cc: xen-devel@lists.xen.org > --- > tools/include/xen-foreign/mkheader.py | 6 ++++++ > xen/include/public/xen.h | 8 ++++---- > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py > index d189b07..57681fa 100644 > --- a/tools/include/xen-foreign/mkheader.py > +++ b/tools/include/xen-foreign/mkheader.py > @@ -21,13 +21,18 @@ inttypes["arm"] = { > "unsigned long" : "uint32_t", > "long" : "uint32_t", > "xen_pfn_t" : "uint64_t", > + "xen_ulong_t" : "uint64_t", > }; > +header["arm"] = """ > +#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 > @@ -42,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