Merge branch 'for-2.6.37/drivers' into for-linus
[deliverable/linux.git] / arch / sparc / include / asm / perf_event.h
CommitLineData
cdd6c482
IM
1#ifndef __ASM_SPARC_PERF_EVENT_H
2#define __ASM_SPARC_PERF_EVENT_H
3
cdd6c482 4#ifdef CONFIG_PERF_EVENTS
b0f82b81
FW
5#include <asm/ptrace.h>
6
cdd6c482 7extern void init_hw_perf_events(void);
b0f82b81 8
b11287e8
DM
9#define perf_arch_fetch_caller_regs(regs, ip) \
10do { \
11 unsigned long _pstate, _asi, _pil, _i7, _fp; \
12 __asm__ __volatile__("rdpr %%pstate, %0\n\t" \
13 "rd %%asi, %1\n\t" \
14 "rdpr %%pil, %2\n\t" \
15 "mov %%i7, %3\n\t" \
16 "mov %%i6, %4\n\t" \
17 : "=r" (_pstate), \
18 "=r" (_asi), \
19 "=r" (_pil), \
20 "=r" (_i7), \
21 "=r" (_fp)); \
22 (regs)->tstate = (_pstate << 8) | \
23 (_asi << 24) | (_pil << 20); \
24 (regs)->tpc = (ip); \
25 (regs)->tnpc = (regs)->tpc + 4; \
26 (regs)->u_regs[UREG_I6] = _fp; \
27 (regs)->u_regs[UREG_I7] = _i7; \
28} while (0)
cdd6c482
IM
29#else
30static inline void init_hw_perf_events(void) { }
31#endif
32
33#endif
This page took 0.092878 seconds and 5 git commands to generate.