From: Sam Ravnborg <sam@ravnborg.org>
To: Andrew Morton <akpm@linux-foundation.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: redef
Date: Wed, 14 Jan 2009 15:32:55 +0000 [thread overview]
Message-ID: <20090114153255.GA32082@uranus.ravnborg.org> (raw)
In-Reply-To: <20090113235940.12d856d0.akpm@linux-foundation.org>
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
But I find the next lines distastefull in a Makefile:
> ifneq ($(CONFIG_SMP),y)
> obj-y += up.o
> endif
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
So maybe a bit more involved patch - but more readable IMO.
Robert - can I ask you to fix it up if you and others agree.
Thanks,
Sam
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Andrew Morton <akpm@linux-foundation.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 16:32:55 +0100 [thread overview]
Message-ID: <20090114153255.GA32082@uranus.ravnborg.org> (raw)
In-Reply-To: <20090113235940.12d856d0.akpm@linux-foundation.org>
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
But I find the next lines distastefull in a Makefile:
> ifneq ($(CONFIG_SMP),y)
> obj-y += up.o
> endif
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
So maybe a bit more involved patch - but more readable IMO.
Robert - can I ask you to fix it up if you and others agree.
Thanks,
Sam
next prev parent reply other threads:[~2009-01-14 15:32 UTC|newest]
Thread overview: 13+ 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 ` sparc32 compile error: redefini Robert Reif
2009-01-14 3:38 ` sparc32 compile error: redefinition of ‘smp_call_function_single’ Robert Reif
2009-01-14 7:59 ` sparc32 compile error: redefinition of ‘smp Andrew Morton
2009-01-14 7:59 ` sparc32 compile error: redefinition of ‘smp_call_function_single’ Andrew Morton
2009-01-14 15:32 ` Sam Ravnborg [this message]
2009-01-14 15:32 ` Sam Ravnborg
2009-01-14 18:25 ` sparc32 compile error: redefinition of ‘smp Andrew Morton
2009-01-14 18:25 ` sparc32 compile error: redefinition of ‘smp_call_function_single’ Andrew Morton
2009-01-14 20:08 ` sparc32 compile error: redef Sam Ravnborg
2009-01-14 20:08 ` sparc32 compile error: redefinition of ‘smp_call_function_single’ 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=20090114153255.GA32082@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=reif@earthlink.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.