public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.10 build failure - atomic_dec_and_lock export
@ 2001-10-02 15:18 Ian Grant
  2001-10-02 16:19 ` Trond Myklebust
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Grant @ 2001-10-02 15:18 UTC (permalink / raw)
  To: trond.myklebust; +Cc: Ian.Grant, linux-kernel

Trond,

2.4.10 won't link with CONFIG_SMP and i386 CPU selected. I believe the problem 
lies in in the #ifndef atomic_dec_and_lock in lib/dec_and_lock.c. As far as I 
can see this symbol is always defined because it's exported.

The following patch works for me, but I barely understand the kernel build 
machinery(*) so please don't use this without checking it carefully.

Ian

* e.g. I cannot understand why this symbol isn't versioned in the object file.

--- linux/lib/dec_and_lock.c.orig	Tue Oct  2 15:47:44 2001
+++ linux/lib/dec_and_lock.c	Tue Oct  2 16:07:01 2001
@@ -1,3 +1,4 @@
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <asm/atomic.h>
@@ -26,7 +27,8 @@
  * store-conditional approach, for example.
  */
 
-#ifndef atomic_dec_and_lock
+#ifdef CONFIG_SMP
+#ifndef CONFIG_HAVE_DEC_LOCK
 int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
 {
 	spin_lock(lock);
@@ -37,4 +39,5 @@
 }
 
 EXPORT_SYMBOL(atomic_dec_and_lock);
+#endif
 #endif

-- 
Ian Grant, Computer Lab., William Gates Building, JJ Thomson Ave., Cambridge
Phone: +44 1223 334420



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-10-03  2:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-02 15:18 2.4.10 build failure - atomic_dec_and_lock export Ian Grant
2001-10-02 16:19 ` Trond Myklebust
2001-10-02 16:39   ` Andreas Schwab
2001-10-02 17:52     ` Trond Myklebust
2001-10-03  2:52       ` [patch] " Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox