diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-06-09 18:55:20 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-09 18:55:57 +0200 |
commit | c726b61c6a5acc54c55ed7a0e7638cc4c5a100a8 (patch) | |
tree | 3f44aa013d31d34951e9610e79ff14c1148ad6ac /arch/powerpc/include/asm | |
parent | perf: Fix build breakage for architecutes without atomic64_t (diff) | |
parent | x86: Unify save_stack_address() and save_stack_address_nosched() (diff) | |
download | linux-c726b61c6a5acc54c55ed7a0e7638cc4c5a100a8.tar.xz linux-c726b61c6a5acc54c55ed7a0e7638cc4c5a100a8.zip |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/perf_event.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/perf_event.h b/arch/powerpc/include/asm/perf_event.h index e6d4ce69b126..5c16b891d501 100644 --- a/arch/powerpc/include/asm/perf_event.h +++ b/arch/powerpc/include/asm/perf_event.h @@ -21,3 +21,15 @@ #ifdef CONFIG_FSL_EMB_PERF_EVENT #include <asm/perf_event_fsl_emb.h> #endif + +#ifdef CONFIG_PERF_EVENTS +#include <asm/ptrace.h> +#include <asm/reg.h> + +#define perf_arch_fetch_caller_regs(regs, __ip) \ + do { \ + (regs)->nip = __ip; \ + (regs)->gpr[1] = *(unsigned long *)__get_SP(); \ + asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \ + } while (0) +#endif |