Skip to contentSkip to conversation

xen: correct BITS_PER_EVTCHN_WORD on arm

PATCH In review Ian Campbell 2 participants 4 messages Feb 27, 2013 – Mar 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: correct BITS_PER_EVTCHN_WORD on arm

This is always 64-bit on ARM, not BITS_PER_LONG

---
 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(-)
xen/include/asm-arm/config.h +3 -0
index 3910dd2..8be8563 100644
@@ -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
xen/include/asm-x86/config.h +2 -0
index 70f70b3..f68afd8 100644
@@ -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
xen/include/xen/sched.h +2 -2
index e108436..ccd0496 100644
@@ -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
Signature · 1 line
1.7.2.5
#1 lore raw

With Jan's correct address this time...

Quoted 56 lines · Ian Campbell

This is always 64-bit on ARM, not BITS_PER_LONG

---
 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(-)
xen/include/asm-arm/config.h +3 -0
index 3910dd2..8be8563 100644
@@ -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
xen/include/asm-x86/config.h +2 -0
index 70f70b3..f68afd8 100644
@@ -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
xen/include/xen/sched.h +2 -2
index e108436..ccd0496 100644
@@ -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
Acked-by on v1 1/1
#2 lore raw
In reply to Ian Campbell
Quoted 7 lines · Ian Campbell

This is always 64-bit on ARM, not BITS_PER_LONG

Quoted 50 lines
---
 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(-)
xen/include/asm-arm/config.h +3 -0
index 3910dd2..8be8563 100644
@@ -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
xen/include/asm-x86/config.h +2 -0
index 70f70b3..f68afd8 100644
@@ -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
xen/include/xen/sched.h +2 -2
index e108436..ccd0496 100644
@@ -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