Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/atomic.h

    r7a0359b r228666c  
    3636#define KERN_ppc32_ATOMIC_H_
    3737
    38 #include <trace.h>
    39 
    40 NO_TRACE static inline void atomic_inc(atomic_t *val)
     38static inline void atomic_inc(atomic_t *val)
    4139{
    4240        atomic_count_t tmp;
     
    4442        asm volatile (
    4543                "1:\n"
    46                 "       lwarx %[tmp], 0, %[count_ptr]\n"
    47                 "       addic %[tmp], %[tmp], 1\n"
    48                 "       stwcx. %[tmp], 0, %[count_ptr]\n"
    49                 "       bne- 1b"
    50                 : [tmp] "=&r" (tmp),
     44                "lwarx %0, 0, %2\n"
     45                "addic %0, %0, 1\n"
     46                "stwcx. %0, 0, %2\n"
     47                "bne- 1b"
     48                : "=&r" (tmp),
    5149                  "=m" (val->count)
    52                 : [count_ptr] "r" (&val->count),
     50                : "r" (&val->count),
    5351                  "m" (val->count)
    5452                : "cc"
     
    5654}
    5755
    58 NO_TRACE static inline void atomic_dec(atomic_t *val)
     56static inline void atomic_dec(atomic_t *val)
    5957{
    6058        atomic_count_t tmp;
     
    6260        asm volatile (
    6361                "1:\n"
    64                 "       lwarx %[tmp], 0, %[count_ptr]\n"
    65                 "       addic %[tmp], %[tmp], -1\n"
    66                 "       stwcx. %[tmp], 0, %[count_ptr]\n"
    67                 "       bne- 1b"
    68                 : [tmp] "=&r" (tmp),
     62                "lwarx %0, 0, %2\n"
     63                "addic %0, %0, -1\n"
     64                "stwcx. %0, 0, %2\n"
     65                "bne- 1b"
     66                : "=&r" (tmp),
    6967                  "=m" (val->count)
    70                 : [count_ptr] "r" (&val->count),
     68                : "r" (&val->count),
    7169                  "m" (val->count)
    7270                : "cc"
     
    7472}
    7573
    76 NO_TRACE static inline atomic_count_t atomic_postinc(atomic_t *val)
     74static inline atomic_count_t atomic_postinc(atomic_t *val)
    7775{
    7876        atomic_inc(val);
     
    8078}
    8179
    82 NO_TRACE static inline atomic_count_t atomic_postdec(atomic_t *val)
     80static inline atomic_count_t atomic_postdec(atomic_t *val)
    8381{
    8482        atomic_dec(val);
     
    8684}
    8785
    88 NO_TRACE static inline atomic_count_t atomic_preinc(atomic_t *val)
     86static inline atomic_count_t atomic_preinc(atomic_t *val)
    8987{
    9088        atomic_inc(val);
     
    9290}
    9391
    94 NO_TRACE static inline atomic_count_t atomic_predec(atomic_t *val)
     92static inline atomic_count_t atomic_predec(atomic_t *val)
    9593{
    9694        atomic_dec(val);
Note: See TracChangeset for help on using the changeset viewer.