fix mips atomic_lock declaration
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
@@ -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 ;
asm-mips/atomic.h line 31
Quoted 11 lines · Peter Buckingham
diff -u -r1.36
atomic.hasm-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
Quoted 2 lines · Ralf Baechle
No.
atomic_lockis 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