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-changelog

[Xen-changelog] [xen-unstable] x86, xenoprof: Add Nehalem to list of ppr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, xenoprof: Add Nehalem to list of ppro cores
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2008 05:50:54 -0700
Delivery-date: Mon, 11 Aug 2008 05:53:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1218448338 -3600
# Node ID 3d5515f40b9b2bfee339cc223f891bd5c61d6855
# Parent  f60c565e2ca24bcf5063da8f0de9e3fef192d451
x86, xenoprof: Add Nehalem to list of ppro cores

Straight port from Linus's tree:

commit 4b9f12a3779c548b68bc9af7d94030868ad3aa1b
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date:   Thu Jul 24 17:29:00 2008 -0700

    x86/oprofile/nmi_int: add Nehalem to list of ppro cores

    ..otherwise oprofile will fall back on that poor timer interrupt.

    Also replace the unreadable chain of if-statements with a
    "switch()"
    statement instead. It generates better code, and is a lot clearer.

    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
---
 xen/arch/x86/oprofile/nmi_int.c |   40 ++++++++++++++++++++++++++++------------
 1 files changed, 28 insertions(+), 12 deletions(-)

diff -r f60c565e2ca2 -r 3d5515f40b9b xen/arch/x86/oprofile/nmi_int.c
--- a/xen/arch/x86/oprofile/nmi_int.c   Mon Aug 11 10:49:57 2008 +0100
+++ b/xen/arch/x86/oprofile/nmi_int.c   Mon Aug 11 10:52:18 2008 +0100
@@ -296,24 +296,40 @@ static int __init ppro_init(char ** cpu_
 {
        __u8 cpu_model = current_cpu_data.x86_model;
 
-       if (cpu_model == 15 || cpu_model == 23) {
+       switch (cpu_model) {
+       case 0 ... 2:
+               *cpu_type = "i386/ppro";
+               break;
+       case 3 ... 5:
+               *cpu_type = "i386/pii";
+               break;
+       case 6 ... 8:
+               *cpu_type = "i386/piii";
+               break;
+       case 9:
+               *cpu_type = "i386/p6_mobile";
+               break;
+       case 10 ... 13:
+               *cpu_type = "i386/p6";
+               break;
+       case 14:
+               *cpu_type = "i386/core";
+               break;
+       case 15: case 23:
                *cpu_type = "i386/core_2";
                ppro_has_global_ctrl = 1;
-       } else if (cpu_model == 14)
-               *cpu_type = "i386/core";
-       else if (cpu_model > 13) {
+               break;
+       case 26:
+               *cpu_type = "i386/core_2";
+               ppro_has_global_ctrl = 1;
+               break;
+       default:
+               /* Unknown */
                printk("xenoprof: Initialization failed. "
                       "Intel processor model %d for P6 class family is not "
                       "supported\n", cpu_model);
                return 0;
-       } else if (cpu_model == 9)
-               *cpu_type = "i386/p6_mobile";
-       else if (cpu_model > 5)
-               *cpu_type = "i386/piii";
-       else if (cpu_model > 2)
-               *cpu_type = "i386/pii";
-       else
-               *cpu_type = "i386/ppro";
+       }
 
        model = &op_ppro_spec;
        return 1;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, xenoprof: Add Nehalem to list of ppro cores, Xen patchbot-unstable <=