]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
oprofile: discover counters for op ppro too
authorAndi Kleen <ak@linux.intel.com>
Mon, 29 Sep 2008 20:23:33 +0000 (22:23 +0200)
committerRobert Richter <robert.richter@amd.com>
Mon, 13 Oct 2008 17:25:11 +0000 (19:25 +0200)
Discover number of counters for all family 6 models even when not
in arch perfmon mode.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/oprofile/op_model_ppro.c
arch/x86/oprofile/op_x86_model.h

index 12e207a67f1b59940a43ec182b8942a6ce2ddb34..f5a226823e947485240aede0839098caee96add0 100644 (file)
@@ -200,9 +200,9 @@ static void ppro_shutdown(struct op_msrs const * const msrs)
 }
 
 
-struct op_x86_model_spec const op_ppro_spec = {
-       .num_counters = 2,
-       .num_controls = 2,
+struct op_x86_model_spec op_ppro_spec = {
+       .num_counters = 2,      /* can be overriden */
+       .num_controls = 2,      /* dito */
        .fill_in_addresses = &ppro_fill_in_addresses,
        .setup_ctrs = &ppro_setup_ctrs,
        .check_ctrs = &ppro_check_ctrs,
@@ -238,6 +238,8 @@ void arch_perfmon_setup_counters(void)
 
        op_arch_perfmon_spec.num_counters = num_counters;
        op_arch_perfmon_spec.num_controls = num_counters;
+       op_ppro_spec.num_counters = num_counters;
+       op_ppro_spec.num_controls = num_counters;
 }
 
 struct op_x86_model_spec op_arch_perfmon_spec = {
index 0b601893a4df726bb5f9874e032f76cf93528657..596de7a5559dd4b17824614d929b9b2835842940 100644 (file)
@@ -45,7 +45,7 @@ struct op_x86_model_spec {
        void (*shutdown)(struct op_msrs const * const msrs);
 };
 
-extern struct op_x86_model_spec const op_ppro_spec;
+extern struct op_x86_model_spec op_ppro_spec;
 extern struct op_x86_model_spec const op_p4_spec;
 extern struct op_x86_model_spec const op_p4_ht2_spec;
 extern struct op_x86_model_spec const op_amd_spec;