Patchwork =?windows-1252?Q?Re=3A_sparc32_compile_error=3A_redefini?= =?windows-1252?Q?tion_of_=91smp=5Fcall=5Ffunction=5Fsingle=92?=

login
register
mail settings
Submitter Robert Reif
Date Jan. 14, 2009, 3:38 a.m.
Message ID <496D5E19.7040802@earthlink.net>
Download mbox | patch
Permalink /patch/18341/
State Accepted
Delegated to: David Miller
Headers show

Comments

Robert Reif - Jan. 14, 2009, 3:38 a.m.
Andrew Morton wrote:
> On Tue, 13 Jan 2009 18:42:39 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
>   
>> On Tue, 13 Jan 2009 18:10:39 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>>
>>     
>>> From: Robert Reif <reif@earthlink.net>
>>> Date: Tue, 13 Jan 2009 20:40:04 -0500
>>>
>>>       
>>>> Todays git produces this compile error on sparc32:
>>>>
>>>> kernel/up.c:10: error: redefinition of ___smp_call_function_single___
>>>> /usr/src/sparc32/linux-2.6/arch/sparc/include/asm/smp_32.h:78: error: previous definition of ___smp_call_function_single___ was here
>>>>         
>>> Andrew, are you sure that Makefile condition for compiling
>>> up.o is correct?
>>>       
>> you give me grounds for now being ;)
>>
>>     
>>> ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y)
>>> obj-y += smp.o
>>> else
>>> obj-y += up.o
>>> endif
>>>
>>> If an arch doesn't use generic SMP helpers, there is no way
>>> we should compile up.c into the tree when SMP.
>>>
>>>       
>> How's about this?
>>
>> --- a/kernel/Makefile~a
>> +++ a/kernel/Makefile
>> @@ -43,7 +43,7 @@ obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
>>  ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y)
>>  obj-y += smp.o
>>  else
>> -obj-y += up.o
>> +obj-$(CONFIG_SMP) += up.o
>>  endif
>>  obj-$(CONFIG_SMP) += spinlock.o
>>  obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
>>     
>
> err, the other way of course...
>
> --- a/kernel/Makefile~a
> +++ a/kernel/Makefile
> @@ -43,6 +43,7 @@ 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
>  obj-$(CONFIG_SMP) += spinlock.o
> _
>
>
>
>   
This worked:


--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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