]> git.hungrycats.org Git - linux/commitdiff
[PATCH] out-of-line locks / x86_64
authorZwane Mwaikambo <zwane@linuxpower.ca>
Sat, 4 Sep 2004 09:18:59 +0000 (02:18 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 4 Sep 2004 09:18:59 +0000 (02:18 -0700)
Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/time.c
arch/x86_64/kernel/vmlinux.lds.S
include/asm-x86_64/ptrace.h

index 1411b1949445c1a1139b27f6f83862f6a031fe58..6cdc12377f5c20f23424d95400649a7867875201 100644 (file)
@@ -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 e502b7e386acf4aca56ac39c43225b04667a2d4b..f656f197b8337e3b8ecbc012fd4eaf6721c266f6 100644 (file)
@@ -16,6 +16,7 @@ SECTIONS
   .text : {
        *(.text)
        SCHED_TEXT
+       LOCK_TEXT
        *(.fixup)
        *(.gnu.warning)
        } = 0x9090
index 22ecea2759c89c74167be8d2bfde67711f209153..86489292359e1ab32f16c935e62429f6bcd807b1 100644 (file)
@@ -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 {