linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: aik@au1.ibm.com, anton@au1.ibm.com, linux-kernel@vger.kernel.org,
	paulus@samba.org, sparclinux@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, davem@davemloft.net
Subject: Re: Fwd: Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)
Date: Sun, 19 Apr 2015 22:17:21 -0700	[thread overview]
Message-ID: <55348BE1.4010305@roeck-us.net> (raw)
In-Reply-To: <1429498885.28239.4.camel@ellerman.id.au>

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

  reply	other threads:[~2015-04-20  5:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-19 18:36 Fwd: Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions) Sowmini Varadhan
2015-04-20  3:01 ` Michael Ellerman
2015-04-20  5:17   ` Guenter Roeck [this message]
2015-04-20  7:38     ` Michael Ellerman
2015-04-20 16:25     ` David Miller
2015-04-20 16:44       ` Guenter Roeck
2015-04-20 16:50         ` David Miller
2015-04-21  1:54           ` Michael Ellerman
2015-04-21  2:32             ` Guenter Roeck
2015-04-21  3:25               ` Michael Ellerman

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=55348BE1.4010305@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=aik@au1.ibm.com \
    --cc=anton@au1.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=sowmini.varadhan@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).