Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbbDTFRZ (ORCPT ); Mon, 20 Apr 2015 01:17:25 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:58417 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbbDTFRY (ORCPT ); Mon, 20 Apr 2015 01:17:24 -0400 Message-ID: <55348BE1.4010305@roeck-us.net> Date: Sun, 19 Apr 2015 22:17:21 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Michael Ellerman , Sowmini Varadhan CC: benh@kernel.crashing.org, aik@au1.ibm.com, anton@au1.ibm.com, paulus@samba.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org Subject: Re: Fwd: Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions) References: <20150419183625.GA18901@oracle.com> <1429498885.28239.4.camel@ellerman.id.au> In-Reply-To: <1429498885.28239.4.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020201.55348BE3.0175,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.000 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 1 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2350 Lines: 61 Hi Michael, On 04/19/2015 08:01 PM, Michael Ellerman wrote: > On Sun, 2015-04-19 at 14:36 -0400, Sowmini Varadhan wrote: >>> On (04/19/15 14:09), David Miller wrote: >>> >>>> On (04/18/15 21:23), Guenter Roeck wrote: >>>>> lib/built-in.o:(.discard+0x1): multiple definition of >>>>> `__pcpu_unique_iommu_pool_hash' >>>>> arch/powerpc/kernel/built-in.o:(.discard+0x18): first defined here >>>>> .. I get a similar failure in the >>>>> powerpc:allmodconfig build >> : >>> >>> Maybe ping the powerpc folks becuase if they can do a quick >>> conversion, this change isn't necessary. >> >> linuxppc-dev, >> >> The disussion above [http://www.spinics.net/lists/sparclinux/msg13835.html] >> is in reference to the issue that Guenter Roeck >> identified. The problem is that we have a >> static DEFINE_PER_CPU(unsigned int, iommu_pool_hash); > > It's static .. > Not if CONFIG_DEBUG_FORCE_WEAK_PER_CPU is configured. >> if CONFIG_DEBUG_FORCE_WEAK_PER_CPU is configured, which is the case here. >> The marked line above shows that __pcpu_unique_iommu_pool_hash is declared as >> global variable" > > OK, so why doesn't CONFIG_DEBUG_FORCE_WEAK_PER_CPU depend on s390 and/or alpha? > The idea is to ensure that per cpu variable names are unique, even if static, because that is what is needed for s390 and alpha. > Someone needs to be doing s390/alpha builds with that enabled anyway, because > otherwise a clash between generic code and s390/alpha won't be caught. > > Or if that's too hard we can rename the powerpc version, but it seems silly to > rename a powerpc variable to deal with a debug option that is only useful for > s390/alpha. > The debug option is intended for all _other_ architectures, to ensure that changes made for those don't break alpha/s390 builds. alpha/s390 have ARCH_NEEDS_WEAK_PER_CPU and don't need the debug option. Sowmini's patch would change the variable name in the lib/ code. But that was not the question here. The question was if the powerpc code could be changed to use the generic iommu code instead of using the powerpc specific code. Thanks, Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/