From: Andrew Morton <akpm@linux-foundation.org>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: tj@kernel.org, max@stro.at, linux-kernel@vger.kernel.org,
dhowells@redhat.com
Subject: Re: >= 2.6.30 broken alpha smp build
Date: Fri, 26 Jun 2009 11:57:46 -0700 [thread overview]
Message-ID: <20090626115746.09314757.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090626124705.GA25147@jurassic.park.msu.ru>
On Fri, 26 Jun 2009 16:47:05 +0400
Ivan Kokshaysky <ink@jurassic.park.msu.ru> wrote:
> On Fri, Jun 26, 2009 at 09:43:22AM +0900, Tejun Heo wrote:
> > The __used attribute is dropped by a patch in percpu patchset as it
> > caused build warning on my test builds and wasn't even effective
> > as-was (overriden by later NULL definition). Ivan, any ideas why it's
> > there?
>
> It was intended for suppressing the compiler warnings about "unused"
> static per-cpu variables, as they were only referenced inside the asm code.
>
> Now it seems to be broken with DECLARE_PER_CPU thing, so I think your
> patch that kills __used attribute should go in as a compile fix ASAP -
> we can live with a few compile warnings until the rest of percpu patchset
> gets merged.
>
OK, we have a wart.
When I do this:
--- a/arch/alpha/include/asm/percpu.h~a
+++ a/arch/alpha/include/asm/percpu.h
@@ -49,7 +49,6 @@ extern unsigned long __per_cpu_offset[NR
: "=&r"(__ptr), "=&r"(tmp_gp)); \
(typeof(&per_cpu_var(var)))(__ptr + (offset)); })
-#define PER_CPU_ATTRIBUTES __used
#endif /* MODULE */
_
I get
In file included from include/linux/sched.h:89,
from /usr/src/devel/arch/alpha/include/asm/uaccess.h:5,
from arch/alpha/kernel/srm_env.c:37:
include/linux/hrtimer.h:314: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typeof'
In file included from /usr/src/devel/arch/alpha/include/asm/uaccess.h:5,
from arch/alpha/kernel/srm_env.c:37:
include/linux/sched.h:138: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typeof'
But hrtimer.h correctly includes percpu.h. I would have expected the
above patch to fix the build.
The reason for it not fixing the build is that this:
#ifndef PER_CPU_ATTRIBUTES
#define PER_CPU_ATTRIBUTES
#endif
is in asm-generic/percpu.h, which alpha does not use.
Would it not have been better to put the above three lines into
linux/percpu.h so that alpha's asm/percpu.h doesn't need to define
PER_CPU_ATTRIBUTES at all?
Ho hum. Anyway, we need a backportable fix, so I'll put this through
some build testing:
--- a/arch/alpha/include/asm/percpu.h~a
+++ a/arch/alpha/include/asm/percpu.h
@@ -49,7 +49,7 @@ extern unsigned long __per_cpu_offset[NR
: "=&r"(__ptr), "=&r"(tmp_gp)); \
(typeof(&per_cpu_var(var)))(__ptr + (offset)); })
-#define PER_CPU_ATTRIBUTES __used
+#define PER_CPU_ATTRIBUTES
#endif /* MODULE */
_
next prev parent reply other threads:[~2009-06-26 18:59 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 [this message]
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
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=20090626115746.09314757.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=ink@jurassic.park.msu.ru \
--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