aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2009-06-12 12:32:07 -0400
committerRobert Richter <robert.richter@amd.com>2009-06-12 12:43:51 -0400
commit802070f5474af1a49435a9528aede47bb18abd47 (patch)
tree802b4b85b068ff1c20e0c2580c838e835f0b7f1b /arch/x86/oprofile
parent1241eb8f136bf3ea409f61590e7663465906d158 (diff)
x86/oprofile: fix initialization of arch_perfmon for core_i7
Commit: e419294 x86/oprofile: moving arch_perfmon counter setup to op_x86_model_spec.init introduced a bug in the initialization of core_i7 leading to the incorrect model setup to &op_ppro_spec. This patch fixes this. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r--arch/x86/oprofile/nmi_int.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 7826dfcc842..28ee490c1b8 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -406,6 +406,7 @@ module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0);
406static int __init ppro_init(char **cpu_type) 406static int __init ppro_init(char **cpu_type)
407{ 407{
408 __u8 cpu_model = boot_cpu_data.x86_model; 408 __u8 cpu_model = boot_cpu_data.x86_model;
409 struct op_x86_model_spec const *spec = &op_ppro_spec; /* default */
409 410
410 if (force_arch_perfmon && cpu_has_arch_perfmon) 411 if (force_arch_perfmon && cpu_has_arch_perfmon)
411 return 0; 412 return 0;
@@ -432,7 +433,7 @@ static int __init ppro_init(char **cpu_type)
432 *cpu_type = "i386/core_2"; 433 *cpu_type = "i386/core_2";
433 break; 434 break;
434 case 26: 435 case 26:
435 model = &op_arch_perfmon_spec; 436 spec = &op_arch_perfmon_spec;
436 *cpu_type = "i386/core_i7"; 437 *cpu_type = "i386/core_i7";
437 break; 438 break;
438 case 28: 439 case 28:
@@ -443,7 +444,7 @@ static int __init ppro_init(char **cpu_type)
443 return 0; 444 return 0;
444 } 445 }
445 446
446 model = &op_ppro_spec; 447 model = spec;
447 return 1; 448 return 1;
448} 449}
449 450