diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2009-11-24 16:32:11 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-11-24 16:32:11 +0900 |
| commit | 49fb2cd2571e0134e5a12c5abab227696e4940c7 (patch) | |
| tree | 9a77364e988ef3f3af24feee3f5bb91bd0c34129 /arch/sh/include/asm/perf_event.h | |
| parent | dfc349402de8e95f6a42e8341e9ea193b718eee3 (diff) | |
| parent | 260af56271f79da0e37faa5a99b1786b221297e5 (diff) | |
Merge branch 'master' into sh/st-integration
Diffstat (limited to 'arch/sh/include/asm/perf_event.h')
| -rw-r--r-- | arch/sh/include/asm/perf_event.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/sh/include/asm/perf_event.h b/arch/sh/include/asm/perf_event.h index 11a302297ab7..3d0c9f36d150 100644 --- a/arch/sh/include/asm/perf_event.h +++ b/arch/sh/include/asm/perf_event.h @@ -1,8 +1,35 @@ #ifndef __ASM_SH_PERF_EVENT_H #define __ASM_SH_PERF_EVENT_H -/* SH only supports software events through this interface. */ -static inline void set_perf_event_pending(void) {} +struct hw_perf_event; + +#define MAX_HWEVENTS 2 + +struct sh_pmu { + const char *name; + unsigned int num_events; + void (*disable_all)(void); + void (*enable_all)(void); + void (*enable)(struct hw_perf_event *, int); + void (*disable)(struct hw_perf_event *, int); + u64 (*read)(int); + int (*event_map)(int); + unsigned int max_events; + unsigned long raw_event_mask; + const int (*cache_events)[PERF_COUNT_HW_CACHE_MAX] + [PERF_COUNT_HW_CACHE_OP_MAX] + [PERF_COUNT_HW_CACHE_RESULT_MAX]; +}; + +/* arch/sh/kernel/perf_event.c */ +extern int register_sh_pmu(struct sh_pmu *); +extern int reserve_pmc_hardware(void); +extern void release_pmc_hardware(void); + +static inline void set_perf_event_pending(void) +{ + /* Nothing to see here, move along. */ +} #define PERF_EVENT_INDEX_OFFSET 0 |
