summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc/atomic.h')
-rw-r--r--include/asm-sparc/atomic.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h
index dc29a13cd..4a55a8929 100644
--- a/include/asm-sparc/atomic.h
+++ b/include/asm-sparc/atomic.h
@@ -8,21 +8,12 @@
#include <linux/config.h>
-#ifdef CONFIG_SMP
-/* This is a temporary measure. -DaveM */
typedef struct { volatile int counter; } atomic_t;
-#define ATOMIC_INIT(i) { (i << 8) }
-#else
-typedef struct { int counter; } atomic_t;
-#define ATOMIC_INIT(i) { (i) }
-#endif
#ifdef __KERNEL__
-#include <asm/system.h>
-#include <asm/psr.h>
-
#ifndef CONFIG_SMP
+#define ATOMIC_INIT(i) { (i) }
#define atomic_read(v) ((v)->counter)
#define atomic_set(v, i) (((v)->counter) = i)
@@ -41,6 +32,8 @@ typedef struct { int counter; } atomic_t;
* 31 8 7 0
*/
+#define ATOMIC_INIT(i) { (i << 8) }
+
static __inline__ int atomic_read(atomic_t *v)
{
int ret = v->counter;