From: John Levon <levon@movementarian.org>
To: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] OProfile: correct CPU type for x86-64
Date: Sun, 31 Aug 2003 20:19:37 +0100 [thread overview]
Message-ID: <20030831191937.GA32426@compsoc.man.ac.uk> (raw)
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)
next reply other threads:[~2003-08-31 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-31 19:19 John Levon [this message]
[not found] <20030831191937.GA32426@compsoc.man.ac.uk.suse.lists.linux.kernel>
2003-08-31 20:25 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030831191937.GA32426@compsoc.man.ac.uk \
--to=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®