Go to the documentation of this file.
12 #ifndef _ASM_POWERPC_OPROFILE_IMPL_H
13 #define _ASM_POWERPC_OPROFILE_IMPL_H
16 #define OP_MAX_COUNTER 8
35 #ifdef CONFIG_OPROFILE_CELL
39 unsigned long cell_support;
47 struct op_powerpc_model {
72 static inline unsigned int classic_ctr_read(
unsigned int i)
76 return mfspr(SPRN_PMC1);
78 return mfspr(SPRN_PMC2);
80 return mfspr(SPRN_PMC3);
82 return mfspr(SPRN_PMC4);
84 return mfspr(SPRN_PMC5);
86 return mfspr(SPRN_PMC6);
91 return mfspr(SPRN_PMC7);
93 return mfspr(SPRN_PMC8);
100 static inline void classic_ctr_write(
unsigned int i,
unsigned int val)
104 mtspr(SPRN_PMC1, val);
107 mtspr(SPRN_PMC2, val);
110 mtspr(SPRN_PMC3, val);
113 mtspr(SPRN_PMC4, val);
116 mtspr(SPRN_PMC5, val);
119 mtspr(SPRN_PMC6, val);
125 mtspr(SPRN_PMC7, val);
128 mtspr(SPRN_PMC8, val);