mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	max@stro.at, linux-kernel@vger.kernel.org, dhowells@redhat.com
Subject: Re: [PATCH] alpha: fix percpu build breakage
Date: Sun, 28 Jun 2009 15:39:40 +0400	[thread overview]
Message-ID: <20090628113940.GA11836@jurassic.park.msu.ru> (raw)
In-Reply-To: <4A46BE34.7040806@kernel.org>

On Sun, Jun 28, 2009 at 09:49:56AM +0900, Tejun Heo wrote:
> alpha percpu access requires custom SHIFT_PERCPU_PTR() definition for
> modules to work around addressing range limitation.  This is done via
> generating inline assembly using C preprocessing which forces the
> assembler to generate external reference.  This happens behind the
> compiler's back and makes the compiler think that static percpu
> variables in modules are unused.
> 
> This used to be worked around by using __unused attribute for percpu
> variables which prevent the compiler from omitting the variable;
> however, recent declare/definition attribute unification change broke
> this as __used can't be used for declaration.  Also, in the process,
> PER_CPU_ATTRIBUTES definition in alpha percpu.h got broken.
> 
> This patch adds PER_CPU_DEF_ATTRIBUTES which is only used for
> definitions and make alpha use it to add __used for percpu variables
> in modules.  This also fixes the PER_CPU_ATTRIBUTES double definition
> bug.

Thanks! I was going to suggest similar patch, but you've beaten
me to it ;-)

> Signed-off-by: Tejun Heo <tj@kernel.org>

Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

As for upcoming percpu patchset, can we similarly move the __weak attribute
to PER_CPU_DEF_ATTRIBUTES? I don't feel really comfortable with an
"extern __weak" combination - it may not work with future compilers...

Ivan.

  reply	other threads:[~2009-06-28 11:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25  9:08 >= 2.6.30 broken alpha smp build maximilian attems
2009-06-25 18:54 ` Andrew Morton
2009-06-26  0:43   ` Tejun Heo
2009-06-26 12:47     ` Ivan Kokshaysky
2009-06-26 18:57       ` Andrew Morton
2009-06-26 19:21         ` Andrew Morton
2009-06-28  0:49           ` [PATCH] alpha: fix percpu build breakage Tejun Heo
2009-06-28 11:39             ` Ivan Kokshaysky [this message]
2009-06-28 12:21               ` Tejun Heo
2009-06-28 15:50                 ` Ivan Kokshaysky

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=20090628113940.GA11836@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@stro.at \
    --cc=tj@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

all inboxes | Powered by JetHome®