1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __ASM_SH_PERF_EVENT_H 3#define __ASM_SH_PERF_EVENT_H 4 5struct hw_perf_event; 6 7#define MAX_HWEVENTS 2 8 9struct 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]; 23}; 24 25/* arch/sh/kernel/perf_event.c */ 26extern int register_sh_pmu(struct sh_pmu *); 27extern int reserve_pmc_hardware(void); 28extern void release_pmc_hardware(void); 29 30#endif /* __ASM_SH_PERF_EVENT_H */ 31