From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [RFC PATCH V4 01/18] xen: correct BITS_PER_EVTCHN_WORD on arm Date: Tue, 5 Mar 2013 12:30:23 +0000 Message-ID: <1362486640-14707-2-git-send-email-wei.liu2@citrix.com> References: <1362486640-14707-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1362486640-14707-1-git-send-email-wei.liu2@citrix.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@citrix.com, tim@xen.org, stefano.stabellini@citrix.com, david.vrabel@citrix.com, jbeulich@suse.com, jbuelich@suse.com List-Id: xen-devel@lists.xenproject.org From: Ian Campbell This is always 64-bit on ARM, not BITS_PER_LONG Signed-off-by: Ian Campbell Cc: keir@xen.org Cc: tim@xen.org Cc: stefano.stabellini@citrix.com Cc: jbuelich@suse.com --- xen/include/asm-arm/config.h | 3 +++ xen/include/asm-x86/config.h | 2 ++ xen/include/xen/sched.h | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 3910dd2..8be8563 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -22,6 +22,9 @@ #define BYTES_PER_LONG (1 << LONG_BYTEORDER) #define BITS_PER_LONG (BYTES_PER_LONG << 3) +/* xen_ulong_t is always 64 bits */ +#define BITS_PER_XEN_ULONG 64 + #define CONFIG_PAGING_ASSISTANCE 1 #define CONFIG_PAGING_LEVELS 3 diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 0a5f031..cf93bd5 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -14,6 +14,8 @@ #define BITS_PER_LONG (BYTES_PER_LONG << 3) #define BITS_PER_BYTE 8 +#define BITS_PER_XEN_ULONG BITS_PER_LONG + #define CONFIG_X86 1 #define CONFIG_X86_HT 1 #define CONFIG_PAGING_ASSISTANCE 1 diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index e108436..ccd0496 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -46,9 +46,9 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t); extern struct domain *dom0; #ifndef CONFIG_COMPAT -#define BITS_PER_EVTCHN_WORD(d) BITS_PER_LONG +#define BITS_PER_EVTCHN_WORD(d) BITS_PER_XEN_ULONG #else -#define BITS_PER_EVTCHN_WORD(d) (has_32bit_shinfo(d) ? 32 : BITS_PER_LONG) +#define BITS_PER_EVTCHN_WORD(d) (has_32bit_shinfo(d) ? 32 : BITS_PER_XEN_ULONG) #endif #define MAX_EVTCHNS(d) (BITS_PER_EVTCHN_WORD(d) * BITS_PER_EVTCHN_WORD(d)) #define EVTCHNS_PER_BUCKET 128 -- 1.7.10.4