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,10 +364,21 @@ int __init nmi_init(struct oprofile_operations ** ops)
switch (vendor) {
case X86_VENDOR_AMD:
/* Needs to be at least an Athlon (or hammer in 32bit mode) */
if (family < 6)
switch (family) {
default:
return -ENODEV;
model = &op_athlon_spec;
nmi_ops.cpu_type = "i386/athlon";
case 6:
model = &op_athlon_spec;
nmi_ops.cpu_type = "i386/athlon";
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)
......
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