Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @file arch/alpha/oprofile/op_impl.h |
| 3 | * |
| 4 | * @remark Copyright 2002 OProfile authors |
| 5 | * @remark Read the file COPYING |
| 6 | * |
| 7 | * @author Richard Henderson <rth@twiddle.net> |
| 8 | */ |
| 9 | |
| 10 | #ifndef OP_IMPL_H |
| 11 | #define OP_IMPL_H 1 |
| 12 | |
Ralf Baechle | 937a801 | 2006-10-07 19:44:33 +0100 | [diff] [blame] | 13 | extern int null_perf_irq(void); |
| 14 | extern int (*perf_irq)(void); |
Ralf Baechle | 5417673 | 2005-02-07 02:54:29 +0000 | [diff] [blame] | 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | /* Per-counter configuration as set via oprofilefs. */ |
| 17 | struct op_counter_config { |
| 18 | unsigned long enabled; |
| 19 | unsigned long event; |
| 20 | unsigned long count; |
| 21 | /* Dummies because I am too lazy to hack the userspace tools. */ |
| 22 | unsigned long kernel; |
| 23 | unsigned long user; |
| 24 | unsigned long exl; |
| 25 | unsigned long unit_mask; |
| 26 | }; |
| 27 | |
| 28 | /* Per-architecture configury and hooks. */ |
| 29 | struct op_mips_model { |
| 30 | void (*reg_setup) (struct op_counter_config *); |
| 31 | void (*cpu_setup) (void * dummy); |
| 32 | int (*init)(void); |
| 33 | void (*exit)(void); |
| 34 | void (*cpu_start)(void *args); |
| 35 | void (*cpu_stop)(void *args); |
| 36 | char *cpu_type; |
| 37 | unsigned char num_counters; |
| 38 | }; |
| 39 | |
| 40 | #endif |