]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
i386/xen: Drop unused functions/variables/types
authorJulien Grall <julien.grall@citrix.com>
Sat, 10 Oct 2015 21:04:41 +0000 (22:04 +0100)
committerJulien Grall <julien.grall@citrix.com>
Tue, 13 Oct 2015 17:28:40 +0000 (18:28 +0100)
- xen_xchg
- __xchg_dummy
_ __xg
- __xchg

sys/i386/include/xen/xen-os.h

index 9b9b63ff0a5888d5c03a840b50b45beb3f8e6da9..05ad5afdda2ac98f6585a4cbf0b0a5f6edd39029 100644 (file)
@@ -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