hv: remove support atomic operation for char/short
From now on, only plan to support atomic operation for int/long.
Acked-by: Eddie Dong
#define ATOMIC_H
#define BUS_LOCK "lock ; "
-/*
- * #define atomic_set_char(P, V) (*(unsigned char *)(P) |= (V))
- */
-static inline void atomic_set_char(unsigned char *p, unsigned char v)
-{
- __asm __volatile(BUS_LOCK "orb %b1,%0"
- : "+m" (*p)
- : "q" (v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_clear_char(P, V) (*(unsigned char *)(P) &= ~(V))
- */
-static inline void atomic_clear_char(unsigned char *p, unsigned char v)
-{
- __asm __volatile(BUS_LOCK "andb %b1,%0"
- : "+m" (*p)
- : "q" (~v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_add_char(P, V) (*(unsigned char *)(P) += (V))
- */
-static inline void atomic_add_char(unsigned char *p, unsigned char v)
-{
- __asm __volatile(BUS_LOCK "addb %b1,%0"
- : "+m" (*p)
- : "q" (v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_subtract_char(P, V) (*(unsigned char *)(P) -= (V))
- */
-static inline void atomic_subtract_char(unsigned char *p, unsigned char v)
-{
- __asm __volatile(BUS_LOCK "subb %b1,%0"
- : "+m" (*p)
- : "q" (v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_set_short(P, V) (*(unsigned short *)(P) |= (V))
- */
-static inline void atomic_set_short(unsigned short *p, unsigned short v)
-{
- __asm __volatile(BUS_LOCK "orw %w1,%0"
- : "+m" (*p)
- : "r" (v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_clear_short(P, V) (*(unsigned short *)(P) &= ~(V))
- */
-static inline void atomic_clear_short(unsigned short *p, unsigned short v)
-{
- __asm __volatile(BUS_LOCK "andw %w1,%0"
- : "+m" (*p)
- : "r" (~v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_add_short(P, V) (*(unsigned short *)(P) += (V))
- */
-static inline void atomic_add_short(unsigned short *p, unsigned short v)
-{
- __asm __volatile(BUS_LOCK "addw %w1,%0"
- : "+m" (*p)
- : "r" (v)
- : "cc", "memory");
-}
-
-/*
- * #define atomic_subtract_short(P, V) (*(unsigned short *)(P) -= (V))
- */
-static inline void atomic_subtract_short(unsigned short *p, unsigned short v)
-{
- __asm __volatile(BUS_LOCK "subw %w1,%0"
- : "+m" (*p)
- : "r" (v)
- : "cc", "memory");
-}
/*
* #define atomic_set_int(P, V) (*(unsigned int *)(P) |= (V))
