Commit 802070f5 authored by Robert Richter's avatar Robert Richter

x86/oprofile: fix initialization of arch_perfmon for core_i7

Commit:

 e419294e 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: default avatarRobert Richter <robert.richter@amd.com>
parent 1241eb8f
...@@ -406,6 +406,7 @@ module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0); ...@@ -406,6 +406,7 @@ module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0);
static int __init ppro_init(char **cpu_type) static int __init ppro_init(char **cpu_type)
{ {
__u8 cpu_model = boot_cpu_data.x86_model; __u8 cpu_model = boot_cpu_data.x86_model;
struct op_x86_model_spec const *spec = &op_ppro_spec; /* default */
if (force_arch_perfmon && cpu_has_arch_perfmon) if (force_arch_perfmon && cpu_has_arch_perfmon)
return 0; return 0;
...@@ -432,7 +433,7 @@ static int __init ppro_init(char **cpu_type) ...@@ -432,7 +433,7 @@ static int __init ppro_init(char **cpu_type)
*cpu_type = "i386/core_2"; *cpu_type = "i386/core_2";
break; break;
case 26: case 26:
model = &op_arch_perfmon_spec; spec = &op_arch_perfmon_spec;
*cpu_type = "i386/core_i7"; *cpu_type = "i386/core_i7";
break; break;
case 28: case 28:
...@@ -443,7 +444,7 @@ static int __init ppro_init(char **cpu_type) ...@@ -443,7 +444,7 @@ static int __init ppro_init(char **cpu_type)
return 0; return 0;
} }
model = &op_ppro_spec; model = spec;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment