changeset: 9455:7c56b04340bd
user: jimix@xxxxxxxxxxxxxxxxxxxxx
date: Thu Mar 23 16:17:45 2006 -0500
summary: pitops should use an unsigned long * for typesafety and portability
diff -r c5ac55399e7d -r 7c56b04340bd xen/include/asm-ppc/bitops.h
--- a/xen/include/asm-ppc/bitops.h Thu Mar 23 16:15:27 2006 -0500
+++ b/xen/include/asm-ppc/bitops.h Thu Mar 23 16:17:45 2006 -0500
@@ -48,13 +48,13 @@
#define smp_mb__before_clear_bit() smp_mb()
#define smp_mb__after_clear_bit() smp_mb()
-static __inline__ int test_bit(unsigned long nr, __const__ volatile void *addr)
+static __inline__ int test_bit(unsigned long nr, __const__ volatile unsigned
long *addr)
{
volatile unsigned long *laddr = (volatile unsigned long *)addr;
return (1UL & (laddr[nr >> 6] >> (nr & 63)));
}
-static __inline__ void set_bit(unsigned long nr, volatile void *addr)
+static __inline__ void set_bit(unsigned long nr, volatile unsigned long *addr)
{
unsigned long old;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -70,7 +70,7 @@ static __inline__ void set_bit(unsigned
: "cc");
}
-static __inline__ void clear_bit(unsigned long nr, volatile void *addr)
+static __inline__ void clear_bit(unsigned long nr, volatile unsigned long
*addr)
{
unsigned long old;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -86,7 +86,7 @@ static __inline__ void clear_bit(unsigne
: "cc");
}
-static __inline__ void change_bit(unsigned long nr, volatile void *addr)
+static __inline__ void change_bit(unsigned long nr, volatile unsigned long
*addr)
{
unsigned long old;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -102,7 +102,7 @@ static __inline__ void change_bit(unsign
: "cc");
}
-static __inline__ int test_and_set_bit(unsigned long nr, volatile void *addr)
+static __inline__ int test_and_set_bit(unsigned long nr, volatile unsigned
long *addr)
{
unsigned long old, t;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -122,7 +122,7 @@ static __inline__ int test_and_set_bit(u
return (old & mask) != 0;
}
-static __inline__ int test_and_clear_bit(unsigned long nr, volatile void *addr)
+static __inline__ int test_and_clear_bit(unsigned long nr, volatile unsigned
long *addr)
{
unsigned long old, t;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -142,7 +142,7 @@ static __inline__ int test_and_clear_bit
return (old & mask) != 0;
}
-static __inline__ int test_and_change_bit(unsigned long nr, volatile void
*addr)
+static __inline__ int test_and_change_bit(unsigned long nr, volatile unsigned
long *addr)
{
unsigned long old, t;
unsigned long mask = 1UL << (nr & 0x3f);
@@ -179,7 +179,7 @@ static __inline__ void set_bits(unsigned
/*
* non-atomic versions
*/
-static __inline__ void __set_bit(unsigned long nr, volatile void *addr)
+static __inline__ void __set_bit(unsigned long nr, volatile unsigned long
*addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
@@ -187,7 +187,7 @@ static __inline__ void __set_bit(unsigne
*p |= mask;
}
-static __inline__ void __clear_bit(unsigned long nr, volatile void *addr)
+static __inline__ void __clear_bit(unsigned long nr, volatile unsigned long
*addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
@@ -195,7 +195,7 @@ static __inline__ void __clear_bit(unsig
*p &= ~mask;
}
-static __inline__ void __change_bit(unsigned long nr, volatile void *addr)
+static __inline__ void __change_bit(unsigned long nr, volatile unsigned long
*addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
@@ -203,7 +203,7 @@ static __inline__ void __change_bit(unsi
*p ^= mask;
}
-static __inline__ int __test_and_set_bit(unsigned long nr, volatile void *addr)
+static __inline__ int __test_and_set_bit(unsigned long nr, volatile unsigned
long *addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
@@ -213,7 +213,7 @@ static __inline__ int __test_and_set_bit
return (old & mask) != 0;
}
-static __inline__ int __test_and_clear_bit(unsigned long nr, volatile void
*addr)
+static __inline__ int __test_and_clear_bit(unsigned long nr, volatile unsigned
long *addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
@@ -223,7 +223,7 @@ static __inline__ int __test_and_clear_b
return (old & mask) != 0;
}
-static __inline__ int __test_and_change_bit(unsigned long nr, volatile void
*addr)
+static __inline__ int __test_and_change_bit(unsigned long nr, volatile
unsigned long *addr)
{
unsigned long mask = 1UL << (nr & 0x3f);
unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
diff -r c5ac55399e7d -r 7c56b04340bd xen/include/asm-ppc/mm.h
--- a/xen/include/asm-ppc/mm.h Thu Mar 23 16:15:27 2006 -0500
+++ b/xen/include/asm-ppc/mm.h Thu Mar 23 16:17:45 2006 -0500
@@ -55,7 +55,7 @@ struct page_info
u32 tlbflush_timestamp;
/* Reference count and various PGC_xxx flags and fields. */
- u32 count_info;
+ unsigned long count_info;
/* Context-dependent fields follow... */
union {
@@ -65,7 +65,7 @@ struct page_info
/* Owner of this page (NULL if page is anonymous). */
struct domain *_domain;
/* Type reference count and various PGT_xxx flags and fields. */
- u32 type_info;
+ unsigned long type_info;
} inuse;
/* Page is on a free list: ((count_info & PGC_count_mask) == 0). */
diff -r c5ac55399e7d -r 7c56b04340bd xen/include/public/xen.h
--- a/xen/include/public/xen.h Thu Mar 23 16:15:27 2006 -0500
+++ b/xen/include/public/xen.h Thu Mar 23 16:17:45 2006 -0500
@@ -314,7 +314,11 @@ typedef struct vcpu_info {
* an upcall activation. The mask is cleared when the VCPU requests
* to block: this avoids wakeup-waiting races.
*/
+#if defined(__powerpc__)
+ unsigned long evtchn_upcall_pending;
+#else
uint8_t evtchn_upcall_pending;
+#endif
uint8_t evtchn_upcall_mask;
unsigned long evtchn_pending_sel;
arch_vcpu_info_t arch;
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|