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

From: John Levon (levon_at_movementarian.org)
Date: 08/31/03

  • Next message: Chris Frey: "Re: Andrea VM changes"
    Date:	Sun, 31 Aug 2003 20:19:37 +0100
    To: torvalds@osdl.org, linux-kernel@vger.kernel.org
    
    

    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)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Chris Frey: "Re: Andrea VM changes"

    Relevant Pages

    • Re: Yes, I really did it!
      ... I was pretty angry at the time, about ready to take a very ... large hammer in hand and reduce that old, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
      (Debian-User)
    • Re: problems installing openoffice.org in etch
      ... use a hammer ... go back to the 32 bit architecture as soon as possible. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: debian ... cant get it to install
      ... It is important to realize that any lock can be picked with a big ... enough hammer. ... -- Sun System & Network Admin manual ... To UNSUBSCRIBE, email to debian-user-request@lists.debian.org ...
      (Debian-User)
    • Re: was wondering
      ... Programming without a hex editor is like watchmaking without a hammer. ... To UNSUBSCRIBE, email to debian-user-request@lists.debian.org ...
      (Debian-User)
    • Re: [2.6.16rc2] compile error
      ... To unsubscribe from this list: ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ... Copyright 2006 by Maurice Eugene Heskett, ...
      (Linux-Kernel)