From: Andrew Morton <akpm@linux-foundation.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Robert Reif <reif@earthlink.net>,
David Miller <davem@davemloft.net>,
"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: sparc32 compile error: redefinition of ‘smp_call_function_single’
Date: Wed, 14 Jan 2009 10:25:44 -0800 [thread overview]
Message-ID: <20090114102544.71893225.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090114153255.GA32082@uranus.ravnborg.org>
On Wed, 14 Jan 2009 16:32:55 +0100 Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jan 13, 2009 at 11:59:40PM -0800, Andrew Morton wrote:
> > On Tue, 13 Jan 2009 22:38:01 -0500 Robert Reif <reif@earthlink.net> wrote:
> >
> > > This worked:
> > >
> > > diff --git a/kernel/Makefile b/kernel/Makefile
> > > index 2aebc4c..368227d 100644
> > > --- a/kernel/Makefile
> > > +++ b/kernel/Makefile
> > > @@ -43,8 +43,10 @@ obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
> > > ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y)
> > > obj-y += smp.o
> > > else
> > > +ifneq ($(CONFIG_SMP),y)
> > > obj-y += up.o
> > > endif
> > > +endif
> > > obj-$(CONFIG_SMP) += spinlock.o
> > > obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
> > > obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
> >
> > This all can be simplified, can't it?
> >
> > obj-$(CONFIG_USE_GENERIC_SMP_HELPERS) += smp.o
> > ifneq ($(CONFIG_SMP),y)
> > obj-y += up.o
> > endif
> >
> > (someone please check my homework - I don't have a good track
> > record here ;))
>
> Looks correct. We pull in smp.o only for SPARC64 AND SMP
SPARC64=n and SMP, actually (assuming sparc64 is the only
USE_GENERIC_SMP_HELPERS=n arch)
> But I find the next lines distastefull in a Makefile:
> > ifneq ($(CONFIG_SMP),y)
> > obj-y += up.o
> > endif
me too.
> I would prefer a small Kconfig helper symbol:
>
> config SPARC_UP
> def_bool y
> depends on !SMP
>
> And then we would do the Makefile bits like this:
> obj-$(CONFIG_SPARC_UP) += up.o
eek. Mentioning sparc explicitly in kernel/Makefile is badder.
we could remove zillions of these conditionals if something somewhere
were to generate negated symbols for us. Say, when kbuild sees
CONFIG_SMP=y, it will generate another symbol: NOT_CONFIG_SMP=y. So
then we can do
obj-$NOT_CONFIG_SMP += up.o
Or is that too cheesy?
next prev parent reply other threads:[~2009-01-14 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <496D4274.6000304@earthlink.net>
2009-01-14 2:10 ` sparc32 compile error: redefinition of ‘smp_call_function_single’ David Miller
2009-01-14 2:42 ` Andrew Morton
2009-01-14 2:45 ` Andrew Morton
2009-01-14 3:38 ` Robert Reif
2009-01-14 7:59 ` Andrew Morton
2009-01-14 15:32 ` Sam Ravnborg
2009-01-14 18:25 ` Andrew Morton [this message]
2009-01-14 20:08 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090114102544.71893225.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=reif@earthlink.net \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox