aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile/op_model_ppro.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/oprofile/op_model_ppro.c')
-rw-r--r--arch/x86/oprofile/op_model_ppro.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index 2a123990a84c..ae5811966883 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -233,7 +233,7 @@ struct op_x86_model_spec const op_ppro_spec = {
233 * the specific CPU. 233 * the specific CPU.
234 */ 234 */
235 235
236void arch_perfmon_setup_counters(void) 236static void arch_perfmon_setup_counters(void)
237{ 237{
238 union cpuid10_eax eax; 238 union cpuid10_eax eax;
239 239
@@ -253,7 +253,14 @@ void arch_perfmon_setup_counters(void)
253 op_arch_perfmon_spec.num_controls = num_counters; 253 op_arch_perfmon_spec.num_controls = num_counters;
254} 254}
255 255
256static int arch_perfmon_init(struct oprofile_operations *ignore)
257{
258 arch_perfmon_setup_counters();
259 return 0;
260}
261
256struct op_x86_model_spec op_arch_perfmon_spec = { 262struct op_x86_model_spec op_arch_perfmon_spec = {
263 .init = &arch_perfmon_init,
257 /* num_counters/num_controls filled in at runtime */ 264 /* num_counters/num_controls filled in at runtime */
258 .fill_in_addresses = &ppro_fill_in_addresses, 265 .fill_in_addresses = &ppro_fill_in_addresses,
259 /* user space does the cpuid check for available events */ 266 /* user space does the cpuid check for available events */