Commit 71099a7e authored by Paul Mackerras's avatar Paul Mackerras

PPC32: adjust <asm/atomic.h> so it doesn't need <asm/system.h>.

Now atomic.h defines the smp_mb__* macros completely itself without
needing the smp_mb definition from <asm/system.h>
parent 6979c6a1
...@@ -17,8 +17,10 @@ typedef struct { volatile int counter; } atomic_t; ...@@ -17,8 +17,10 @@ typedef struct { volatile int counter; } atomic_t;
extern void atomic_clear_mask(unsigned long mask, unsigned long *addr); extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define SMP_SYNC "sync"
#define SMP_ISYNC "\n\tisync" #define SMP_ISYNC "\n\tisync"
#else #else
#define SMP_SYNC ""
#define SMP_ISYNC #define SMP_ISYNC
#endif #endif
...@@ -192,10 +194,11 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) ...@@ -192,10 +194,11 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
return t; return t;
} }
#define smp_mb__before_atomic_dec() smp_mb() #define __MB __asm__ __volatile__ (SMP_SYNC : : : "memory")
#define smp_mb__after_atomic_dec() smp_mb() #define smp_mb__before_atomic_dec() __MB
#define smp_mb__before_atomic_inc() smp_mb() #define smp_mb__after_atomic_dec() __MB
#define smp_mb__after_atomic_inc() smp_mb() #define smp_mb__before_atomic_inc() __MB
#define smp_mb__after_atomic_inc() __MB
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_PPC_ATOMIC_H_ */ #endif /* _ASM_PPC_ATOMIC_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment