* [PATCH] OProfile: correct CPU type for x86-64
@ 2003-08-31 19:19 John Levon
0 siblings, 0 replies; 2+ messages in thread
From: John Levon @ 2003-08-31 19:19 UTC (permalink / raw)
To: torvalds, linux-kernel
Enable the Hammer specific events by giving the correct cpu string.
From, and tested by, Will Cohen.
diff -Naur -X dontdiff linux-cvs/arch/i386/oprofile/nmi_int.c linux-fixes/arch/i386/oprofile/nmi_int.c
--- linux-cvs/arch/i386/oprofile/nmi_int.c 2003-08-29 16:56:24.000000000 +0100
+++ linux-fixes/arch/i386/oprofile/nmi_int.c 2003-08-29 17:02:20.000000000 +0100
@@ -364,10 +364,21 @@
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)
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <20030831191937.GA32426@compsoc.man.ac.uk.suse.lists.linux.kernel>]
end of thread, other threads:[~2003-08-31 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-31 19:19 [PATCH] OProfile: correct CPU type for x86-64 John Levon
[not found] <20030831191937.GA32426@compsoc.man.ac.uk.suse.lists.linux.kernel>
2003-08-31 20:25 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®