From: Julien Grall Date: Sat, 10 Oct 2015 21:04:41 +0000 (+0100) Subject: i386/xen: Drop unused functions/variables/types X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d13695103ddac672c2b857ff37d624dea50d346d;p=people%2Fjulieng%2Ffreebsd.git i386/xen: Drop unused functions/variables/types - xen_xchg - __xchg_dummy _ __xg - __xchg --- diff --git a/sys/i386/include/xen/xen-os.h b/sys/i386/include/xen/xen-os.h index 9b9b63ff0a58..05ad5afdda2a 100644 --- a/sys/i386/include/xen/xen-os.h +++ b/sys/i386/include/xen/xen-os.h @@ -57,36 +57,6 @@ static inline void rep_nop(void) */ typedef struct { volatile int counter; } atomic_t; -#define xen_xchg(ptr,v) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) -static __inline unsigned long __xchg(unsigned long x, volatile void * ptr, - int size) -{ - switch (size) { - case 1: - __asm__ __volatile__("xchgb %b0,%1" - :"=q" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 2: - __asm__ __volatile__("xchgw %w0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 4: - __asm__ __volatile__("xchgl %0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - } - return x; -} - /** * test_and_clear_bit - Clear a bit and return its old value * @nr: Bit to set