WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[PATCH] Xenoprof: Support Intel CORE microarchitecture (was Re: [Xen-dev

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [PATCH] Xenoprof: Support Intel CORE microarchitecture (was Re: [Xen-devel] Xen support for i386/core and i386/core2?)
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Thu, 16 Nov 2006 11:16:40 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 16 Nov 2006 02:16:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C181E192.466A%Keir.Fraser@xxxxxxxxxxxx> (Keir Fraser's message of "Thu, 16 Nov 2006 09:36:18 +0000")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C181E192.466A%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Repost of Andrew Theurer's patch
http://lists.xensource.com/archives/html/xen-devel/2006-10/msg00032.html


Message-ID: <45213A82.8010009@xxxxxxxxxx>
Date: Mon, 02 Oct 2006 11:12:50 -0500
From: Andrew Theurer <habanero@xxxxxxxxxx>
To: xen-devel@xxxxxxxxxxxxxxxxxxx

This adds support for core and core2 chips. Tested on Woodcrest processors. 
Requires Oprofile 0.9.2.

-Andrew

Signed-off-by: Andrew Theurer <habanero@xxxxxxxxxx>

diff -Naurp xen-unstable.hg-11684/xen/arch/x86/oprofile/nmi_int.c 
xen-unstable.hg-11684-oprofile/xen/arch/x86/oprofile/nmi_int.c
--- xen-unstable.hg-11684/xen/arch/x86/oprofile/nmi_int.c       2006-10-02 
10:55:35.000000000 -0500
+++ xen-unstable.hg-11684-oprofile/xen/arch/x86/oprofile/nmi_int.c      
2006-10-02 10:58:35.000000000 -0500
@@ -305,22 +305,24 @@ static int __init ppro_init(char *cpu_ty
 {
        __u8 cpu_model = current_cpu_data.x86_model;
 
-       if (cpu_model > 0xd) {
+       if (cpu_model > 15) {
                printk("xenoprof: Initialization failed. "
                       "Intel processor model %d for P6 class family is not "
                       "supported\n", cpu_model);
                return 0;
        }
-
-       if (cpu_model == 9) {
+       else if (cpu_model == 15)
+               strncpy (cpu_type, "i386/core_2", XENOPROF_CPU_TYPE_SIZE - 1);
+       else if (cpu_model == 14)
+               strncpy (cpu_type, "i386/core", XENOPROF_CPU_TYPE_SIZE - 1);
+       else if (cpu_model == 9)
                strncpy (cpu_type, "i386/p6_mobile", XENOPROF_CPU_TYPE_SIZE - 
1);
-       } else if (cpu_model > 5) {
+       else if (cpu_model > 5)
                strncpy (cpu_type, "i386/piii", XENOPROF_CPU_TYPE_SIZE - 1);
-       } else if (cpu_model > 2) {
+       else if (cpu_model > 2)
                strncpy (cpu_type, "i386/pii", XENOPROF_CPU_TYPE_SIZE - 1);
-       } else {
+       else
                strncpy (cpu_type, "i386/ppro", XENOPROF_CPU_TYPE_SIZE - 1);
-       }
 
        model = &op_ppro_spec;
        return 1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>