initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / i386 / oprofile / op_x86_model.h
blob5cc2514670f3fecedf969297aab1097203cd238f
1 /**
2 * @file op_x86_model.h
3 * interface to x86 model-specific MSR operations
5 * @remark Copyright 2002 OProfile authors
6 * @remark Read the file COPYING
8 * @author Graydon Hoare
9 */
11 #ifndef OP_X86_MODEL_H
12 #define OP_X86_MODEL_H
14 struct op_saved_msr {
15 unsigned int high;
16 unsigned int low;
19 struct op_msr {
20 unsigned long addr;
21 struct op_saved_msr saved;
24 struct op_msrs {
25 struct op_msr * counters;
26 struct op_msr * controls;
29 struct pt_regs;
31 /* The model vtable abstracts the differences between
32 * various x86 CPU model's perfctr support.
34 struct op_x86_model_spec {
35 unsigned int const num_counters;
36 unsigned int const num_controls;
37 void (*fill_in_addresses)(struct op_msrs * const msrs);
38 void (*setup_ctrs)(struct op_msrs const * const msrs);
39 int (*check_ctrs)(unsigned int const cpu,
40 struct op_msrs const * const msrs,
41 struct pt_regs * const regs);
42 void (*start)(struct op_msrs const * const msrs);
43 void (*stop)(struct op_msrs const * const msrs);
46 extern struct op_x86_model_spec const op_ppro_spec;
47 extern struct op_x86_model_spec const op_p4_spec;
48 extern struct op_x86_model_spec const op_p4_ht2_spec;
49 extern struct op_x86_model_spec const op_athlon_spec;
51 #endif /* OP_X86_MODEL_H */