# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 933613959bf6a8e48a43e1cd93d4afae4a660ec8
# Parent  c52ba3176a285683f00beaa2e82d2ed39bcedae8
[LINUX][POWERPC] oops on making the short pointer

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 include/asm-powerpc/xen/asm/synch_bitops.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r c52ba3176a28 -r 933613959bf6 include/asm-powerpc/xen/asm/synch_bitops.h
--- a/include/asm-powerpc/xen/asm/synch_bitops.h        Thu Sep 28 12:26:59 
2006 -0400
+++ b/include/asm-powerpc/xen/asm/synch_bitops.h        Wed Oct 04 11:20:16 
2006 -0400
@@ -20,7 +20,7 @@ __synch_cmpxchg_u16(volatile unsigned sh
 __synch_cmpxchg_u16(volatile unsigned short *p, unsigned long old, unsigned 
long new)
 {
        int idx;
-       volatile unsigned int *xp = (unsigned int *)((ulong)p & 0x3);
+       volatile unsigned int *xp = (unsigned int *)((ulong)p & ~(0x3UL));
        union {
                unsigned int word;
                struct {
@@ -71,6 +71,8 @@ __synch_cmpxchg(volatile void *ptr, unsi
                                    (unsigned long)_n_, sizeof(*(ptr))); \
   })
 
+#define synch_cmpxchg_subword(ptr,o,n) __synch_cmpxchg_u16((ptr), (o), (n))
+
 #else
 #error "this only works for CONFIG_SMP"
 #endif

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to