Re: sparc32 compile error: redefinition of ‘smp_call_function_single’

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux