CONFIG_SPINLINE broken on 2.6.9-rc2
Sonny Rao
sonny at burdell.org
Fri Sep 24 06:02:58 EST 2004
Hi, I was trying to get a profile with inlined spinlocks on 2.6.9-rc2
and I noticed that my kernel build failed with several undefined
references to spin_unlock_wait.
After some grepping around it looked like the prototype in
include/asm-ppc64/spinlock.h for spin_unlock_wait might be incorrect and
should be a preprocessor define (like the ones in all of the other
architectures including ppc), and the kernel does build and run with
this change.
Is this correct?
Sonny
Here's the one-liner:
Fix CONFIG_SPINLINE for ppc64 by adding macro for spin_unlock_wait
in include/asm-ppc64/spinlock.h
--- linux-2.6.9-rc2/include/asm-ppc64/spinlock.h.original 2004-09-23 14:36:08.618964736 -0500
+++ linux-2.6.9-rc2/include/asm-ppc64/spinlock.h 2004-09-23 14:36:53.231971488 -0500
@@ -65,7 +65,7 @@ extern void __rw_yield(rwlock_t *lock);
#define __rw_yield(x) barrier()
#define SHARED_PROCESSOR 0
#endif
-extern void spin_unlock_wait(spinlock_t *lock);
+#define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x))
/*
* This returns the old value in the lock, so we succeeded
More information about the Linuxppc64-dev
mailing list