Changes in kernel/arch/ppc32/include/atomic.h [228666c:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/atomic.h
r228666c r7a0359b 36 36 #define KERN_ppc32_ATOMIC_H_ 37 37 38 static inline void atomic_inc(atomic_t *val) 38 #include <trace.h> 39 40 NO_TRACE static inline void atomic_inc(atomic_t *val) 39 41 { 40 42 atomic_count_t tmp; … … 42 44 asm volatile ( 43 45 "1:\n" 44 " lwarx %0, 0, %2\n"45 " addic %0, %0, 1\n"46 " stwcx. %0, 0, %2\n"47 " bne- 1b"48 : "=&r" (tmp),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), 49 51 "=m" (val->count) 50 : "r" (&val->count),52 : [count_ptr] "r" (&val->count), 51 53 "m" (val->count) 52 54 : "cc" … … 54 56 } 55 57 56 static inline void atomic_dec(atomic_t *val)58 NO_TRACE static inline void atomic_dec(atomic_t *val) 57 59 { 58 60 atomic_count_t tmp; … … 60 62 asm volatile ( 61 63 "1:\n" 62 " lwarx %0, 0, %2\n"63 " addic %0, %0, -1\n"64 " stwcx. %0, 0, %2\n"65 " bne- 1b"66 : "=&r" (tmp),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), 67 69 "=m" (val->count) 68 : "r" (&val->count),70 : [count_ptr] "r" (&val->count), 69 71 "m" (val->count) 70 72 : "cc" … … 72 74 } 73 75 74 static inline atomic_count_t atomic_postinc(atomic_t *val)76 NO_TRACE static inline atomic_count_t atomic_postinc(atomic_t *val) 75 77 { 76 78 atomic_inc(val); … … 78 80 } 79 81 80 static inline atomic_count_t atomic_postdec(atomic_t *val)82 NO_TRACE static inline atomic_count_t atomic_postdec(atomic_t *val) 81 83 { 82 84 atomic_dec(val); … … 84 86 } 85 87 86 static inline atomic_count_t atomic_preinc(atomic_t *val)88 NO_TRACE static inline atomic_count_t atomic_preinc(atomic_t *val) 87 89 { 88 90 atomic_inc(val); … … 90 92 } 91 93 92 static inline atomic_count_t atomic_predec(atomic_t *val)94 NO_TRACE static inline atomic_count_t atomic_predec(atomic_t *val) 93 95 { 94 96 atomic_dec(val);
Note:
See TracChangeset
for help on using the changeset viewer.