]> git.hungrycats.org Git - linux/commitdiff
[PATCH] OProfile: correct CPU type for x86-64
authorJohn Levon <levon@movementarian.org>
Sun, 31 Aug 2003 07:19:48 +0000 (00:19 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 07:19:48 +0000 (00:19 -0700)
Enable the Hammer specific events by giving the correct cpu string.
From, and tested by, Will Cohen.

arch/i386/oprofile/nmi_int.c

index 7e404741f7d1f6d8608d1edd926e8f3bd1292861..38864770113612e9b5aebf6dd66729edc8f7ec77 100644 (file)
@@ -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)