Make SH port work for packagers that don't differentiate between SH4 and SH4A
[fio.git] / arch / arch-sparc64.h
index 6ee8659716f4654a28a00f34fef4f1313191ca1d..332cf9179388377ebfc12bf85458f1dd6b73d5ea 100644 (file)
 #define read_barrier()         membar_safe("#LoadLoad")
 #define write_barrier()                membar_safe("#StoreStore")
 
-typedef struct {
-       volatile unsigned char lock;
-} spinlock_t;
-
-static inline void spin_lock(spinlock_t *lock)
-{
-       unsigned long tmp;
-
-       __asm__ __volatile__(
-               "1:     ldstub          [%1], %0\n"
-               "       membar          #StoreLoad | #StoreStore\n"
-               "       brnz,pn         %0, 2f\n"
-               "        nop\n"
-               "       .subsection     2\n"
-               "2:     ldub            [%1], %0\n"
-               "       membar          #LoadLoad\n"
-               "       brnz,pt         %0, 2b\n"
-               "        nop\n"
-               "       ba,a,pt         %%xcc, 1b\n"
-               "       .previous"
-               : "=&r" (tmp)
-               : "r" (lock)
-               : "memory");
-}
-
-static inline void spin_unlock(spinlock_t *lock)
-{
-       __asm__ __volatile__(
-               "       membar          #StoreStore | #LoadStore\n"
-               "       stb             %%g0, [%0]"
-               : /* No outputs */
-               : "r" (lock)
-               : "memory");
-}
-
 #endif