Re: [PATCH] Replacing __SMP__ by CONFIG_SMP globally in linux-2.3.39.

From: Niels Kristian Bech Jensen (nkbj@image.dk)
Date: Wed Jan 12 2000 - 22:51:09 EST


On Wed, 12 Jan 2000, Richard B. Johnson wrote:

> On Wed, 12 Jan 2000, Niels Kristian Bech Jensen wrote:
>
> > The purpose is to get rid of what I consider an ugly hack. Since
> > CONFIG_SMP is a proper config option, it and only it should be used IMHO.
> > What is the purpose of having a config option symbol (CONFIG_SMP) define
> > another symbol (__SMP__) ?
> >
>
> The first to define a symbol makes the rule. How do you claim that
> "CONFIG_SMP" is any more `proper` than "__SMP__" ?
>
CONFIG_SMP is part of the configuration system.

> > External modules built for SMP kernels should already define CONFIG_SMP if
> > they use any header files from the kernel, as CONFIG_SMP is used by some
> > files under the linux/include directory. The change is that they don't
> > need to define both __SMP__ and CONFIG_SMP.
> >
>
> A new rule? You say; "external modules built for SMP kernels should
> already define CONFIG_SMP". Since when?
>
On a clean pre-patch-2.3.40-1 tree:

hafnium:~/src/pre-patch-2.3.40-1/include$ grep -r CONFIG_SMP *
asm-i386/bugs.h:#if defined(CONFIG_X86_GOOD_APIC) && defined(CONFIG_SMP)
asm-sparc/asm_offsets.h:#ifndef CONFIG_SMP
asm-sparc/asm_offsets.h:#else /* CONFIG_SMP */
asm-sparc/asm_offsets.h:#endif /* CONFIG_SMP */
asm-sparc64/asm_offsets.h:#ifndef CONFIG_SMP
asm-sparc64/asm_offsets.h:#else /* CONFIG_SMP */
asm-sparc64/asm_offsets.h:#endif /* CONFIG_SMP */

It seems that both i386, sparc and sparc64 already use CONFIG_SMP. The
main reason for my change is that I'd like to have only one symbol for SMP
throughout the kernel. That will make sure that no bugs appear because
one symbol is defined, but not the other as the case can be in the present
situation.

-- 
Niels Kristian Bech Jensen -- nkbj@image.dk -- http://www.image.dk/~nkbj/

----------->> Stop software piracy --- use free software! <<-----------

- 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 : Sat Jan 15 2000 - 21:00:21 EST