aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/perf_event.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-09 01:03:59 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-09 01:07:36 -0400
commitb11287e8c5b2797b86351f6db0fcd9ff99b20bab (patch)
tree560985ca36806d4463f71db4eb4ac4dd538a3cca /arch/sparc/include/asm/perf_event.h
parentc8837434e8bfd08abf3b596dbaeffe4a8b59a284 (diff)
sparc64: Fix perf_arch_get_caller_regs().
After b0f82b81fe6bbcf78d478071f33e44554726bc81 ("perf: Drop the skip argument from perf_arch_fetch_regs_caller") the build broke on sparc64 due to the lack of a module symbol export of __perf_arch_fetch_caller_regs. But that assembler helper can actually be complete eliminated now that the semantics of this interface have been greatly simplified. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/perf_event.h')
-rw-r--r--arch/sparc/include/asm/perf_event.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/perf_event.h b/arch/sparc/include/asm/perf_event.h
index 74c4e0cd889c..727af70646cb 100644
--- a/arch/sparc/include/asm/perf_event.h
+++ b/arch/sparc/include/asm/perf_event.h
@@ -10,11 +10,26 @@ extern void set_perf_event_pending(void);
10 10
11extern void init_hw_perf_events(void); 11extern void init_hw_perf_events(void);
12 12
13extern void 13#define perf_arch_fetch_caller_regs(regs, ip) \
14__perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); 14do { \
15 15 unsigned long _pstate, _asi, _pil, _i7, _fp; \
16#define perf_arch_fetch_caller_regs(pt_regs, ip) \ 16 __asm__ __volatile__("rdpr %%pstate, %0\n\t" \
17 __perf_arch_fetch_caller_regs(pt_regs, ip, 1); 17 "rd %%asi, %1\n\t" \
18 "rdpr %%pil, %2\n\t" \
19 "mov %%i7, %3\n\t" \
20 "mov %%i6, %4\n\t" \
21 : "=r" (_pstate), \
22 "=r" (_asi), \
23 "=r" (_pil), \
24 "=r" (_i7), \
25 "=r" (_fp)); \
26 (regs)->tstate = (_pstate << 8) | \
27 (_asi << 24) | (_pil << 20); \
28 (regs)->tpc = (ip); \
29 (regs)->tnpc = (regs)->tpc + 4; \
30 (regs)->u_regs[UREG_I6] = _fp; \
31 (regs)->u_regs[UREG_I7] = _i7; \
32} while (0)
18#else 33#else
19static inline void init_hw_perf_events(void) { } 34static inline void init_hw_perf_events(void) { }
20#endif 35#endif