Subject: [PATCH 2.6] fix mips atomic_lock declaration

From: Peter Buckingham <[email-masked]>
Date: Mon, 13 Sep 2004 15:33:09 -0700

Hi Ralf,

I modified the declaration of atomic_lock to be static. This means that 
I can now build and run SMP on the 1250. See attached patch.

peter

Signed-off-by: Peter Buckingham <[email-masked]>
? include/asm-mips/.atomic.h.swp
? include/asm-mips/agp.h
Index: include/asm-mips/atomic.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/atomic.h,v
retrieving revision 1.36
diff -u -r1.36 atomic.h
--- include/asm-mips/atomic.h	19 Aug 2004 09:54:23 -0000	1.36
+++ include/asm-mips/atomic.h	13 Sep 2004 21:51:56 -0000
@@ -26,7 +26,7 @@
 #include <asm/cpu-features.h>
 #include <asm/war.h>
 
-extern spinlock_t atomic_lock;
+static spinlock_t atomic_lock;
 
 typedef struct { volatile int counter; } atomic_t;

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 14 Sep 2004 02:22:37 +0200

> +++ include/asm-mips/atomic.h	13 Sep 2004 21:51:56 -0000

No.  atomic_lock is intentionally undefined, so this patch seems very
broken.

  Ralf

---

From: Peter Buckingham <[email-masked]>
Date: Mon, 13 Sep 2004 17:24:52 -0700

> No.  atomic_lock is intentionally undefined, so this patch seems very

if i don't change it to static it won't compile correctly. so obviously 
i don't get something.

it seems that the bcm1250 needs atomic_lock to be defined for the fall 
through case for smp. either that or i need to figure out how to write 
the assemble code for the SB1 case...

what do you think needs to be done?

peter