public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Rottmann <JRottmann@LiPPERTembedded.de>
To: Willy Tarreau <willy@meta-x.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86: fix ptrace.o compile error
Date: Thu, 09 Aug 2012 16:19:35 +0200	[thread overview]
Message-ID: <5023C6F7.6040108@LiPPERTembedded.de> (raw)

x86: fix ptrace.o compile error

Fix compiling Linux 2.6.32.59 with gcc 4.7.1 (Debian 7 testing).  Mainline has
instead removed the "asmregparm" in ptrace.c (in fact, everywhere), but this
alternative seemed too invasive.

  CC      arch/x86/kernel/ptrace.o
arch/x86/kernel/ptrace.c:1472:17: error: conflicting types for 'syscall_trace_enter'
In file included from /usr/src/linux-2.6.32/arch/x86/include/asm/vm86.h:130:0,
                 from /usr/src/linux-2.6.32/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:
/usr/src/linux-2.6.32/arch/x86/include/asm/ptrace.h:145:13: note: previous declaration of 'syscall_trace_enter' was here
arch/x86/kernel/ptrace.c:1517:17: error: conflicting types for 'syscall_trace_leave'
In file included from /usr/src/linux-2.6.32/arch/x86/include/asm/vm86.h:130:0,
                 from /usr/src/linux-2.6.32/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-2.6.32/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:56,
                 from arch/x86/kernel/ptrace.c:11:
/usr/src/linux-2.6.32/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of 'syscall_trace_leave' was here
make[2]: *** [arch/x86/kernel/ptrace.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTembedded.de>
---

--- linux-2.6.32.59/arch/x86/include/asm/ptrace.h
+++ fix_ptrace.o_compile_error/arch/x86/include/asm/ptrace.h
@@ -130,6 +130,7 @@
 #ifdef __KERNEL__
 
 #include <linux/init.h>
+#include <linux/linkage.h>
 
 struct cpuinfo_x86;
 struct task_struct;
@@ -142,8 +143,8 @@
 			 int error_code, int si_code);
 void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
 
-extern long syscall_trace_enter(struct pt_regs *);
-extern void syscall_trace_leave(struct pt_regs *);
+extern asmregparm long syscall_trace_enter(struct pt_regs *);
+extern asmregparm void syscall_trace_leave(struct pt_regs *);
 
 static inline unsigned long regs_return_value(struct pt_regs *regs)
 {
_

                 reply	other threads:[~2012-08-09 14:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5023C6F7.6040108@LiPPERTembedded.de \
    --to=jrottmann@lippertembedded.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=willy@meta-x.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