From: Andrew Morton <akpm@osdl.org>
To: Peter Chubb <peterc@gelato.unsw.edu.au>
Cc: tony.luck@intel.com, linux-ia64@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IA64 build broken... cond_syscall()... Fixes?
Date: Tue, 02 Nov 2004 03:28:22 +0000 [thread overview]
Message-ID: <20041101201808.58a559a5.akpm@osdl.org> (raw)
In-Reply-To: <200411020239.iA22dsQl026520@mail23.syd.optusnet.com.au>
Peter Chubb <peterc@gelato.unsw.edu.au> wrote:
>
>
> Hi Folks,
> The kernel 2.6 IA64 build has been broken for several days (see
> http://www.gelato.unsw.edu.au/kerncomp )
>
> The reason is that cond_syscall() for IA64 is defined as:
>
> #define cond_syscall(x) asmlinkage long x (void) \
> __attribute__((weak,alias("sys_ni_syscall")))
>
> which of course doesn't work if there's a prototype in scope for x,
> unless the type of x just happens to be the same as for sys_ni_syscall.
>
> Changing to the type-safe version
> #define cond_syscall(x) __typeof__ (x) x \
> __attribute__((weak,alias("sys_ni_syscall")));
> gives an error, e.g.,
> error: `compat_sys_futex' defined both normally and as an alias
Yeah, it's a real bitch, that.
> Most architectures use inline assembly language which avoids the
> problem. However, we don't want to do this for IA64, to allow
> compilers other than gcc to be used (in general, gcc generated code
> for IA64 is extremely poor).
>
> There are several ways to fix this. The simple way is to ensure that
> there are no prototypes for any system calls included in kernel/sys.c
> (the only place where cond_syscall is used). That's what this patch
> does:
But I bet it introduces various nasty warnings or type-unsafety on other
architectures.
Shouldn't we just bite the bullet and hoist all that cond_syscall stuff out
into its own .c file?
next parent reply other threads:[~2004-11-02 3:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200411020239.iA22dsQl026520@mail23.syd.optusnet.com.au>
2004-11-02 3:28 ` Andrew Morton [this message]
2004-11-02 4:01 ` [PATCH] IA64 build broken... cond_syscall()... Fixes? Peter Chubb
2004-11-02 2:39 Peter Chubb
2004-11-02 22:07 ` Luck, Tony
2004-11-02 22:18 ` Andrew Morton
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=20041101201808.58a559a5.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterc@gelato.unsw.edu.au \
--cc=tony.luck@intel.com \
/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