Re: SMP DEBUG_SPINLOCKS

From: George Anzinger (george@pioneer.net)
Date: Thu May 18 2000 - 12:20:42 EST


Ralf Baechle wrote:
>
> On Tue, May 16, 2000 at 07:07:15PM -0700, George Anzinger wrote:
>
> > There is a define of DEBUG_SPINLOCKS in spinlock.h but it is only
> > defined for the not
>
> 504 Parse Error.
>
> > Anyone know where I can find a version for the __SMP__ case?
>
> <asm/spinlock.h> is only used for SMP. The UP versions of the spinlocks
> are in <linux/spinlock.h>.
>
> __SMP__ is dead, it's been replaced with CONFIG_SMP in 2.3.
>
> Ralf

Well it lives on. The Makefile in the top directory has:

ifdef CONFIG_SMP
CFLAGS += -D__SMP__
AFLAGS += -D__SMP__
endif

And there are far far more references to __SMP__ in the code than to
CONFIG_SMP (only one in the main line kernel). The question is, the
<asm-i386/spinlock.h> has a DEBUG_SPINLOCKS define for #ifndef __SMP__
case but there is no such option for the defined case. (There seems to
be a lot of code in the same file to back up this define, but it is all
for UP or at least is not active for SMP.) The actual code emitted by
the ndef case is also NOT useful spin lock code for an SMP case while
the SMP case code looks like it really does something.

George

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:15 EST