From: Dave Anderson <anderson@redhat.com> Date: Tue, 2 Sep 2008 13:48:20 -0400 Subject: [ia64] oprofile: recognize Montvale cpu as Itanium2 Message-id: 48BD7C64.4030509@redhat.com O-Subject: [RHEL5.3 PATCH 1/2 v2] oprofile: recognize ia64 Montvale cpu as Itanium2 (bare-metal) Bugzilla: 452588 RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: Prarit Bhargava <prarit@redhat.com> Repost from thunderbird, along with equivalent xen piece. BZ #452588 - [5.3] oprofile does not detect Dual-Core Itanium2 Montvale CPU correctly https://bugzilla.redhat.com/show_bug.cgi?id=452588 The oprofile user code does not detect the Montvale CPU as an Itanium2 cpu type because /dev/oprofile/cpu_type returns string "ia64/ia64" instead of "ia64/itanium2", restricting the available events. The patch recognizes ia64 family 0x20 as "ia64/itanium2", in the same way that /proc/cpuinfo does. Tested by reporter with opcontrol and ophelp. diff --git a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c index bc41dd3..9cc56cb 100644 --- a/arch/ia64/oprofile/perfmon.c +++ b/arch/ia64/oprofile/perfmon.c @@ -64,6 +64,7 @@ static char * get_cpu_type(void) case 0x07: return "ia64/itanium"; case 0x1f: + case 0x20: return "ia64/itanium2"; default: return "ia64/ia64";