public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] 2.6.14-rc5-mm1 build fails for non SMP systems
@ 2005-10-25  1:12 Peter Williams
  2005-10-25  1:43 ` Peter Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Williams @ 2005-10-25  1:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List

Without CONFIG_DEBUG_SPINLOCK configured in I'm getting a large number 
of "implicit declaration of function ‘__raw_read_unlock’" warnings and a 
subsequent failure at the link stage.

A trivial change to include/linux/spinlock_up.h (i.e. moving the 
definition of __raw_read_unlock() outside the ifdef) can get rid of this 
warning but I'm not sure that it's the right thing to do as I suspect 
this may be an indication of a less trivial problem elsewhere.

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

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

* Re: [BUG] 2.6.14-rc5-mm1 build fails for non SMP systems
  2005-10-25  1:12 [BUG] 2.6.14-rc5-mm1 build fails for non SMP systems Peter Williams
@ 2005-10-25  1:43 ` Peter Williams
  2005-10-25  1:51   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Williams @ 2005-10-25  1:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List

Peter Williams wrote:
> Without CONFIG_DEBUG_SPINLOCK configured in I'm getting a large number 
> of "implicit declaration of function ‘__raw_read_unlock’" warnings and a 
> subsequent failure at the link stage.
> 
> A trivial change to include/linux/spinlock_up.h (i.e. moving the 
> definition of __raw_read_unlock() outside the ifdef) can get rid of this 
> warning but I'm not sure that it's the right thing to do as I suspect 
> this may be an indication of a less trivial problem elsewhere.

Further investigation reveals a number of similar warnings for 
__raw_write_unlock() and the following failure in the ipv4 code:

In file included from 
/home/peterw/wrk/PlugSched/MM-2.6.14/include/linux/mroute.h:130,
                  from 
/home/peterw/wrk/PlugSched/MM-2.6.14/net/ipv4/route.c:90:
/home/peterw/wrk/PlugSched/MM-2.6.14/include/net/sock.h: In function 
‘sk_dst_get’:
/home/peterw/wrk/PlugSched/MM-2.6.14/include/net/sock.h:972: warning: 
implicit declaration of function ‘__raw_read_unlock’
/home/peterw/wrk/PlugSched/MM-2.6.14/include/net/sock.h: In function 
‘sk_dst_set’:
/home/peterw/wrk/PlugSched/MM-2.6.14/include/net/sock.h:991: warning: 
implicit declaration of function ‘__raw_write_unlock’
/home/peterw/wrk/PlugSched/MM-2.6.14/net/ipv4/route.c: In function 
‘rt_check_expire’:
/home/peterw/wrk/PlugSched/MM-2.6.14/net/ipv4/route.c:663: warning: 
dereferencing ‘void *’ pointer
/home/peterw/wrk/PlugSched/MM-2.6.14/net/ipv4/route.c:663: error: 
request for member ‘raw_lock’ in something not a structure or union
make[3]: *** [net/ipv4/route.o] Error 1
make[2]: *** [net/ipv4] Error 2
make[1]: *** [net] Error 2
make: *** [_all] Error 2

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

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

* Re: [BUG] 2.6.14-rc5-mm1 build fails for non SMP systems
  2005-10-25  1:43 ` Peter Williams
@ 2005-10-25  1:51   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2005-10-25  1:51 UTC (permalink / raw)
  To: Peter Williams; +Cc: linux-kernel

Peter Williams <pwil3058@bigpond.net.au> wrote:
>
> Further investigation reveals a number of similar warnings for 
>  __raw_write_unlock() and the following failure in the ipv4 code:

yup.  Please use this:


From: Miklos Szeredi <miklos@szeredi.hu>

The "inline spin_unlock..." patches don't compile on:

CONFIG_PREEMPT=n
CONFIG_DEBUG_SPINLOCK=n
CONFIG_SMP=n

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 include/linux/spinlock.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN include/linux/spinlock.h~x86-inline-spin_unlock-if-not-config_debug_spinlock-and-not-config_preempt-fix include/linux/spinlock.h
--- 25/include/linux/spinlock.h~x86-inline-spin_unlock-if-not-config_debug_spinlock-and-not-config_preempt-fix	Mon Oct 24 15:44:38 2005
+++ 25-akpm/include/linux/spinlock.h	Mon Oct 24 15:44:38 2005
@@ -174,7 +174,7 @@ extern int __lockfunc generic__raw_read_
 /*
  * We inline the unlock functions in the nondebug case:
  */
-#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT)
+#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP)
 # define spin_unlock(lock)		_spin_unlock(lock)
 # define read_unlock(lock)		_read_unlock(lock)
 # define write_unlock(lock)		_write_unlock(lock)
@@ -184,7 +184,7 @@ extern int __lockfunc generic__raw_read_
 # define write_unlock(lock)		__raw_write_unlock(&(lock)->raw_lock)
 #endif
 
-#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT)
+#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP)
 # define spin_unlock_irq(lock)		_spin_unlock_irq(lock)
 # define read_unlock_irq(lock)		_read_unlock_irq(lock)
 # define write_unlock_irq(lock)		_write_unlock_irq(lock)
_


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

end of thread, other threads:[~2005-10-25  1:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25  1:12 [BUG] 2.6.14-rc5-mm1 build fails for non SMP systems Peter Williams
2005-10-25  1:43 ` Peter Williams
2005-10-25  1:51   ` Andrew Morton

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