0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifdef CONFIG_PPC_PERF_CTRS
0014 #include <asm/perf_event_server.h>
0015 #else
0016 static inline bool is_sier_available(void) { return false; }
0017 static inline unsigned long get_pmcs_ext_regs(int idx) { return 0; }
0018 #endif
0019
0020 #ifdef CONFIG_FSL_EMB_PERF_EVENT
0021 #include <asm/perf_event_fsl_emb.h>
0022 #endif
0023
0024 #ifdef CONFIG_PERF_EVENTS
0025 #include <asm/ptrace.h>
0026 #include <asm/reg.h>
0027
0028 #define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs
0029
0030
0031
0032
0033
0034 #define perf_arch_fetch_caller_regs(regs, __ip) \
0035 do { \
0036 (regs)->result = 0; \
0037 (regs)->nip = __ip; \
0038 (regs)->gpr[1] = current_stack_frame(); \
0039 asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \
0040 } while (0)
0041
0042
0043 extern bool is_sier_available(void);
0044 extern unsigned long get_pmcs_ext_regs(int idx);
0045
0046 extern u64 PERF_REG_EXTENDED_MASK;
0047 #define PERF_REG_EXTENDED_MASK PERF_REG_EXTENDED_MASK
0048 #endif