public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
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 21:21:17 +0900	[thread overview]
Message-ID: <4A47603D.40205@kernel.org> (raw)
In-Reply-To: <20090628113940.GA11836@jurassic.park.msu.ru>

Hello, Ivan.

Ivan Kokshaysky wrote:
> 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...

Oh... the newest incarnation looks like the following.

#if defined(ARCH_NEEDS_WEAK_PER_CPU) || defined(CONFIG_DEBUG_FORCE_WEAK_PER_CPU)
#define DECLARE_PER_CPU_SECTION(type, name, sec)			\
	extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name;		\
	extern __PCPU_ATTRS(sec) __weak __typeof__(type) per_cpu__##name

#define DEFINE_PER_CPU_SECTION(type, name, sec)				\
	__PCPU_DUMMY_ATTRS char __pcpu_scope_##name;			\
	__PCPU_DUMMY_ATTRS char __pcpu_unique_##name;			\
	__PCPU_ATTRS(sec) __weak __typeof__(type) per_cpu__##name
#else
#define DECLARE_PER_CPU_SECTION(type, name, sec)			\
	extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name

#define DEFINE_PER_CPU_SECTION(type, name, sec)				\
	__PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name
#endif

So, I can simply drop __weak from the declaration like the following.
Looks good?

 include/linux/percpu-defs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index cf32838..9b7a53c 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -56,7 +56,7 @@
  */
 #define DECLARE_PER_CPU_SECTION(type, name, sec)			\
 	extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name;		\
-	extern __PCPU_ATTRS(sec) __weak __typeof__(type) per_cpu__##name
+	extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name
 
 #define DEFINE_PER_CPU_SECTION(type, name, sec)				\
 	__PCPU_DUMMY_ATTRS char __pcpu_scope_##name;			\

-- 
tejun

  reply	other threads:[~2009-06-28 12:21 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
2009-06-28 12:21               ` Tejun Heo [this message]
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=4A47603D.40205@kernel.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@stro.at \
    /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