|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-arm
[XenARM] [PATCH] make the ifdef generic for any 32 bit architecture.
 
There are other #ifdef __i386__ in this file and I am not sure
They shall all be converted.
At least the variable is not overflowed anymore.
Signed-off-by: Jean-Christophe DUBOIS <jcd@xxxxxxxxxxxxxxx>
---
 xen/common/tmem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 115465b..6ff0369 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -49,12 +49,14 @@
 #define INVERT_SENTINEL(_x,_y) _x->sentinel = ~_y##_SENTINEL
 #define ASSERT_SENTINEL(_x,_y) \
     ASSERT(_x->sentinel != ~_y##_SENTINEL);ASSERT(_x->sentinel == 
_y##_SENTINEL)
-#ifdef __i386__
+#if INTPTR_MAX == INT32_MAX
+/* We are on 32 bits architecture */
 #define POOL_SENTINEL 0x87658765
 #define OBJ_SENTINEL 0x12345678
 #define OBJNODE_SENTINEL 0xfedcba09
 #define PGD_SENTINEL  0x43214321
 #else
+/* 64 bits architecture */
 #define POOL_SENTINEL 0x8765876587658765
 #define OBJ_SENTINEL 0x1234567812345678
 #define OBJNODE_SENTINEL 0xfedcba0987654321
-- 
1.7.4.1
_______________________________________________
Xen-arm mailing list
Xen-arm@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-arm
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [XenARM] [PATCH] make the ifdef generic for any 32 bit architecture.,
Jean-Christophe DUBOIS <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |