Commit f41549ab authored by John Levon's avatar John Levon Committed by Linus Torvalds

[PATCH] OProfile: correct CPU type for x86-64

Enable the Hammer specific events by giving the correct cpu string.
From, and tested by, Will Cohen.
parent bea9b7fa
...@@ -364,11 +364,22 @@ int __init nmi_init(struct oprofile_operations ** ops) ...@@ -364,11 +364,22 @@ int __init nmi_init(struct oprofile_operations ** ops)
switch (vendor) { switch (vendor) {
case X86_VENDOR_AMD: case X86_VENDOR_AMD:
/* Needs to be at least an Athlon (or hammer in 32bit mode) */ /* Needs to be at least an Athlon (or hammer in 32bit mode) */
if (family < 6)
switch (family) {
default:
return -ENODEV; return -ENODEV;
case 6:
model = &op_athlon_spec; model = &op_athlon_spec;
nmi_ops.cpu_type = "i386/athlon"; nmi_ops.cpu_type = "i386/athlon";
break; break;
#if defined(CONFIG_X86_64)
case 0xf:
model = &op_athlon_spec;
nmi_ops.cpu_type = "x86-64/hammer";
break;
#endif /* CONFIG_X86_64 */
}
break;
#if !defined(CONFIG_X86_64) #if !defined(CONFIG_X86_64)
case X86_VENDOR_INTEL: case X86_VENDOR_INTEL:
......
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