From patchwork Wed Jan 14 03:38:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Reif X-Patchwork-Id: 18341 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 84B7ADE0D1 for ; Wed, 14 Jan 2009 14:38:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbZANDiL (ORCPT ); Tue, 13 Jan 2009 22:38:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751527AbZANDiL (ORCPT ); Tue, 13 Jan 2009 22:38:11 -0500 Received: from pop-sarus.atl.sa.earthlink.net ([207.69.195.72]:52997 "EHLO pop-sarus.atl.sa.earthlink.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbZANDiL (ORCPT ); Tue, 13 Jan 2009 22:38:11 -0500 Received: from user-142h2k8.cable.mindspring.com ([72.40.138.136] helo=[192.168.0.90]) by pop-sarus.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1LMwZt-0007e7-00; Tue, 13 Jan 2009 22:38:02 -0500 Message-ID: <496D5E19.7040802@earthlink.net> Date: Tue, 13 Jan 2009 22:38:01 -0500 From: Robert Reif User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Andrew Morton CC: David Miller , "sparclinux@vger.kernel.org" , mingo@elte.hu, linux-kernel@vger.kernel.org Subject: =?windows-1252?Q?Re=3A_sparc32_compile_error=3A_redefini?= =?windows-1252?Q?tion_of_=91smp=5Fcall=5Ffunction=5Fsingle=92?= References: <496D4274.6000304@earthlink.net> <20090113.181039.185575172.davem@davemloft.net> <20090113184239.e6b6e68e.akpm@linux-foundation.org> <20090113184536.95ebc973.akpm@linux-foundation.org> In-Reply-To: <20090113184536.95ebc973.akpm@linux-foundation.org> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Andrew Morton wrote: > On Tue, 13 Jan 2009 18:42:39 -0800 Andrew Morton wrote: > > >> On Tue, 13 Jan 2009 18:10:39 -0800 (PST) David Miller wrote: >> >> >>> From: Robert Reif >>> 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 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