From: Zwane Mwaikambo <zwane@fsmlabs.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Matt Mackall <mpm@selenic.com>,
William Lee Irwin III <wli@holomorphy.com>,
Andi Kleen <ak@suse.de>
Subject: [PATCH][8/8] Arch agnostic completely out of line locks / x86_64
Date: Thu, 2 Sep 2004 20:03:02 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0409021241291.4481@montezuma.fsmlabs.com> (raw)
arch/x86_64/kernel/time.c | 13 +++++++++++++
arch/x86_64/kernel/vmlinux.lds.S | 1 +
include/asm-x86_64/ptrace.h | 4 ++++
3 files changed, 18 insertions(+)
Andi, i'm not so sure about that return address in profile_pc, i think i
need to read a bit more.
Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Index: linux-2.6.9-rc1-mm1-stage/include/asm-x86_64/ptrace.h
===================================================================
RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/include/asm-x86_64/ptrace.h,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 ptrace.h
--- linux-2.6.9-rc1-mm1-stage/include/asm-x86_64/ptrace.h 26 Aug 2004 13:13:07 -0000 1.1.1.1
+++ linux-2.6.9-rc1-mm1-stage/include/asm-x86_64/ptrace.h 2 Sep 2004 23:24:05 -0000
@@ -83,7 +83,11 @@ struct pt_regs {
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
#define user_mode(regs) (!!((regs)->cs & 3))
#define instruction_pointer(regs) ((regs)->rip)
+#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
+extern unsigned long profile_pc(struct pt_regs *regs);
+#else
#define profile_pc(regs) instruction_pointer(regs)
+#endif
void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
enum {
Index: linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/time.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/arch/x86_64/kernel/time.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 time.c
--- linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/time.c 26 Aug 2004 13:13:06 -0000 1.1.1.1
+++ linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/time.c 2 Sep 2004 23:58:08 -0000
@@ -179,6 +179,19 @@ int do_settimeofday(struct timespec *tv)
EXPORT_SYMBOL(do_settimeofday);
+#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
+unsigned long profile_pc(struct pt_regs *regs)
+{
+ unsigned long pc = instruction_pointer(regs);
+
+ if (pc >= (unsigned long)&__lock_text_start &&
+ pc <= (unsigned long)&__lock_text_end)
+ return *(unsigned long *)regs->rbp;
+ return pc;
+}
+EXPORT_SYMBOL(profile_pc);
+#endif
+
/*
* In order to set the CMOS clock precisely, set_rtc_mmss has to be called 500
* ms after the second nowtime has started, because when nowtime is written
Index: linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/vmlinux.lds.S
===================================================================
RCS file: /home/cvsroot/linux-2.6.9-rc1-mm1/arch/x86_64/kernel/vmlinux.lds.S,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 vmlinux.lds.S
--- linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/vmlinux.lds.S 26 Aug 2004 13:13:06 -0000 1.1.1.1
+++ linux-2.6.9-rc1-mm1-stage/arch/x86_64/kernel/vmlinux.lds.S 2 Sep 2004 13:08:15 -0000
@@ -16,6 +16,7 @@ SECTIONS
.text : {
*(.text)
SCHED_TEXT
+ LOCK_TEXT
*(.fixup)
*(.gnu.warning)
} = 0x9090
next reply other threads:[~2004-09-03 0:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-03 0:03 Zwane Mwaikambo [this message]
2004-09-04 11:16 ` Andi Kleen
2004-09-04 18:26 ` Zwane Mwaikambo
2004-09-06 7:28 ` Andi Kleen
2004-09-06 16:19 ` Zwane Mwaikambo
2004-09-06 17:50 ` Andi Kleen
2004-09-07 15:33 ` Zwane Mwaikambo
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=Pine.LNX.4.58.0409021241291.4481@montezuma.fsmlabs.com \
--to=zwane@fsmlabs.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=torvalds@osdl.org \
--cc=wli@holomorphy.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
all inboxes | Powered by JetHome®