[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Memory barrier definitions in xenctrl.h for ia64?
Looking in tools/libxc/xenctrl.h it seems we define macros for memory barriers, #if defined(__i386__) #define mb() __asm__ __volatile__ ( "lock; addl $0,0(%%esp)" : : : "memory" ) #define rmb() __asm__ __volatile__ ( "lock; addl $0,0(%%esp)" : : : "memory" ) #define wmb() __asm__ __volatile__ ( "" : : : "memory") #elif defined(__x86_64__) #define mb() __asm__ __volatile__ ( "mfence" : : : "memory") #define rmb() __asm__ __volatile__ ( "lfence" : : : "memory") #define wmb() __asm__ __volatile__ ( "" : : : "memory") #elif defined(__ia64__) /* FIXME */ #define mb() #define rmb() #define wmb() #elif defined(__powerpc__) /* XXX loosen these up later */ #define mb() __asm__ __volatile__ ("sync" : : : "memory") #define rmb() __asm__ __volatile__ ("sync" : : : "memory") /* lwsync? */ #define wmb() __asm__ __volatile__ ("sync" : : : "memory") /* eieio? */ #else #error "Define barriers" #endif I'm not familiar with ia64 myself - does it really not need memory barriers? The userspace tools blktap, xenfb & xconsoled are all using these macros in various places so if ia64 does indeed need memory barriers it looks like there is some nasty bug potential here Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |