Skip to contentSkip to conversation

fix mips atomic_lock declaration

PATCH In review Peter Buckingham 2 participants 3 messages Sep 13, 2004 – Sep 14, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix mips atomic_lock declaration

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

? 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

asm-mips/atomic.h +1 -1
diff -u -r1.36 atomic.h
@@ -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;
 
#1 lore raw

asm-mips/atomic.h line 31

Quoted 11 lines · Peter Buckingham

diff -u -r1.36 atomic.h

asm-mips/atomic.h +1 -1
@@ -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;

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

Ralf

#2 lore raw
Quoted 2 lines · Ralf Baechle

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

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