From: Harvey Harrison <harvey.harrison@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] x86: Cleanup ptrace.h
Date: Thu, 17 Jan 2008 18:00:19 -0800 [thread overview]
Message-ID: <1200621619.5724.94.camel@brick> (raw)
Leave definition of pt_regs in its own section, move all kernel
code to section afterwards, unify prototype definitions, has some
conditional prototypes to make it clear what was only defined in
32 and 64 bit.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
include/asm-x86/ptrace.h | 43 ++++++++++++++++---------------------------
1 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index 0ad9a2b..79d5b8f 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -7,17 +7,6 @@
#ifndef __ASSEMBLY__
-#ifdef __KERNEL__
-
-/* the DS BTS struct is used for ptrace as well */
-#include <asm/ds.h>
-
-struct task_struct;
-extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
-
-#endif /* __KERNEL__ */
-
-
#ifdef __i386__
/* this struct defines the way the registers are stored on the
stack during a system call. */
@@ -69,16 +58,6 @@ struct pt_regs {
#include <asm/vm86.h>
#include <asm/segment.h>
-struct task_struct;
-
-extern unsigned long
-convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
-
-extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
-
-#define regs_return_value(regs) ((regs)->ax)
-
-extern unsigned long profile_pc(struct pt_regs *regs);
#endif /* __KERNEL__ */
#else /* __i386__ */
@@ -143,20 +122,30 @@ struct pt_regs {
/* top of stack page */
};
-#define regs_return_value(regs) ((regs)->ax)
+#endif /* __KERNEL__ */
+#endif /* !__i386__ */
-extern unsigned long profile_pc(struct pt_regs *regs);
-void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
+#ifdef __KERNEL__
+
+/* the DS BTS struct is used for ptrace as well */
+#include <asm/ds.h>
struct task_struct;
+extern void ptrace_bts_take_timestamp(struct task_struct *, enum bts_qualifier);
+
+extern unsigned long profile_pc(struct pt_regs *regs);
+
extern unsigned long
convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs);
-#endif /* __KERNEL__ */
-#endif /* !__i386__ */
+#ifdef CONFIG_X86_32
+extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
+#else
+void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
+#endif
-#ifdef __KERNEL__
+#define regs_return_value(regs) ((regs)->ax)
/*
* user_mode_vm(regs) determines whether a register set came from user mode.
--
1.5.4.rc2.1164.g6451
reply other threads:[~2008-01-18 2:00 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=1200621619.5724.94.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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