Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / sh / include / asm / perf_event.h
blob468c7ca8bd2e50b89b8104ccbee0759d10f4981b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_PERF_EVENT_H
3 #define __ASM_SH_PERF_EVENT_H
5 struct hw_perf_event;
7 #define MAX_HWEVENTS 2
9 struct sh_pmu {
10 const char *name;
11 unsigned int num_events;
12 void (*disable_all)(void);
13 void (*enable_all)(void);
14 void (*enable)(struct hw_perf_event *, int);
15 void (*disable)(struct hw_perf_event *, int);
16 u64 (*read)(int);
17 int (*event_map)(int);
18 unsigned int max_events;
19 unsigned long raw_event_mask;
20 const int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]
21 [PERF_COUNT_HW_CACHE_OP_MAX]
22 [PERF_COUNT_HW_CACHE_RESULT_MAX];
25 /* arch/sh/kernel/perf_event.c */
26 extern int register_sh_pmu(struct sh_pmu *);
27 extern int reserve_pmc_hardware(void);
28 extern void release_pmc_hardware(void);
30 #endif /* __ASM_SH_PERF_EVENT_H */