]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
i386: drop unused atomic_t, atomic_inc and rdtscll
authorJulien Grall <julien.grall@citrix.com>
Sat, 10 Oct 2015 21:10:38 +0000 (22:10 +0100)
committerJulien Grall <julien.grall@citrix.com>
Tue, 13 Oct 2015 17:28:40 +0000 (18:28 +0100)
sys/i386/include/xen/xen-os.h

index 05ad5afdda2ac98f6585a4cbf0b0a5f6edd39029..ae86a35fba6906894966f46cec9133698bff0e70 100644 (file)
@@ -50,12 +50,6 @@ static inline void rep_nop(void)
 #define LOCK_PREFIX ""
 #define LOCK ""
 #define ADDR (*(volatile long *) addr)
-/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-typedef struct { volatile int counter; } atomic_t;
 
 /**
  * test_and_clear_bit - Clear a bit and return its old value
@@ -134,25 +128,6 @@ static __inline__ void clear_bit(int nr, volatile void * addr)
                 :"Ir" (nr));
 }
 
-/**
- * atomic_inc - increment atomic variable
- * @v: pointer of type atomic_t
- * 
- * Atomically increments @v by 1.  Note that the guaranteed
- * useful range of an atomic_t is only 24 bits.
- */ 
-static __inline__ void atomic_inc(atomic_t *v)
-{
-        __asm__ __volatile__(
-                LOCK "incl %0"
-                :"=m" (v->counter)
-                :"m" (v->counter));
-}
-
-
-#define rdtscll(val) \
-     __asm__ __volatile__("rdtsc" : "=A" (val))
-
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _MACHINE_XEN_XEN_OS_H_ */