Message ID | 20081216.214100.07002773.davem@davemloft.net |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
From: Chris Torek <chris.torek@windriver.com> Date: Wed, 17 Dec 2008 02:17:59 -0700 > >I guess Chris is not excited enough about this issue to > >reply :-) > > Heh, more like, back-burnered, and not sufficiently knowledgeable > about the ptrace code to have commented earlier. > > I do now have some (sparc64) code for doing oprofile stack traces > on interrupts I can send in now, though. There's one possibly-a-bug > issue I'm not at all sure about, and various possible style items, > and of course for those using sparc32, someone would have to make > appropriate adjustments. > > Is there any interest in the oprofile code? Sure. I added NMI oprofile support in the sparc-next-2.6 tree so you probably want to submit your changes relative to that: git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h index 84e969f..cd6fbfc 100644 --- a/arch/sparc/include/asm/ptrace_64.h +++ b/arch/sparc/include/asm/ptrace_64.h @@ -114,6 +114,7 @@ struct sparc_trapf { #ifdef __KERNEL__ #include <linux/threads.h> +#include <asm/system.h> static inline int pt_regs_trap_type(struct pt_regs *regs) { @@ -130,6 +131,14 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs) return (regs->tstate &= ~TSTATE_SYSCALL); } +#define arch_ptrace_stop_needed(exit_code, info) \ +({ flush_user_windows(); \ + get_thread_wsaved() != 0; \ +}) + +#define arch_ptrace_stop(exit_code, info) \ + synchronize_user_stack() + struct global_reg_snapshot { unsigned long tstate; unsigned long tpc;